Dear @Eriks81,
thank you for sharing your question with the Wefugees Community!
Yes, if you have a German child, it is possible for you to get a residence permit. It is a so called "Aufenthaltserlaubnis zur Personensorge" and basically means that you receive the permit to take care of your child.
For the residence permit you apply at the Ausländerbehörde. If the permit was successfully granted they will then also change your status from your student visa.
Please note that there are some prerequisites for the residence permit. Most important is the "Vaterschaftsanerkennung" and a so called "Sorgerechtserklärung" - it means that you and the mother of the child both agree to take care of the child together. The both of you need to see the Youth Welfare Office (Jugendamt) or even better a notary and give your statement. If you don´t live together with your child you also have to prove that you have been taking actual care of your child and want to continue to do so.
Please check out the following link for the rest of the prerequisites. Also keep in mind the additional information provided in the comments:
https://***.wefugees.de/102216/can-i-stay-in-germany-if-i-have-a-child-with-a-german-woman?show=203324#a203324
I hope this answer was helpful for you. Please don´t hesitate getting back to the Wefugee Community if you have further questions!
All the best
Melina
Note: Please keep in mind that we can´t provide qualified legal advice via the internet and that any information given can´t replace such legal advice.