thank you for sharing this question with the wefugees community.
I think I answered most of your question already in treat https://www.wefugees.de/807038/illegal-boyfriend-vaterschaft-notary-with-country-passport
You are free to take a DNA Test if the mother of the child agrees. There is no general necessity for a DNA test but if the authorities are in doubt regarding the biological paternity (biologische Vaterschaft) it might support your case. If the authorities (Notary, Jugendamt) request documents to verify your identity, a DNA test is of no use.
Prices for a DNA-Test (father, mother, child) are starting from 300 Euros.
I hope my answers were helpful and I would be very happy if you would contact me again with further questions. I'm a consultant with mbeon and I‘ll be glad to help you over a longer period of time. Mbeon is an online advice for migrants via the mbeon app, which you can install on your smartphone for free. Download it from App Store or Google Play Store. You can find me in the mbeon app and get confidential individual advice in a secure virtual space without other people reading our conversation. Further information: www.mbeon.de.