Dear @Li,
As far as I know, the new law you heard about was not implemented yet (since the government coalition dissolved and did not pass all proposed legislation). For the paternity recognition, you can contact the "Jugendamt" (where it is free of charge). If your personal situation is a bit more complicated, I can recommend to consult a refugee counselling office for individual support (this search engine helps to find a respective office in your area).
We discussed the topic of declaring paternity and custody many times on this platform. Maybe you can use the search function to go through the information. Here, for example, we dicsussed a potential rejection of the paternity recognition.
In any case, please also don't hesitate to get back to us with any further questions.
All the best,
Meike