Welcome to the Wefugees Community and thank you for reaching out to us.
We were discussing this topic already a couple of times on this platform - maybe you want to follow this link to see previous questions and answers.
In general it is possible to get a residence permit - but it can get complicated as well.
As long as you are not married, the official recognition of the paternity and the shared custody are important.
I think it makes sense to get some individual support in a migration counselling office in your case.
However, also don't hesitate to get back to us with any further questions.
All the best,