Welcome back to the Wefugees community and thank you for sharing your question.
Having a a German child does not guarantee a stay in Germany automatically. It will be important that you apply for a residence permit according to Section 28 of the German residence law.
To get the process started, acknowledging the fatherhood (Vaterschaftsanerkennung) and sharing the custody will help to prove, that you actually take care of the child and that it will be in the child’s best interest to see both parents regularly.
I hope this helps and please get back to us with any further questions.
All the best,