Thank you for reaching out to the Wefugee Community!
If a child is born in Germany and the parents are third-country nationals not yet living in Germany for the required period (8 years and an unlimited residence permit at time of birth), the child will get the nationality of the mother, or, if the parents are married or the father recognized paternity, the nationality of both parents (in case the parents have different ones). However, the regulations of the respective countries of nationalities also need to be considered.
As far as I know, if the father of the child is a recognized refugee, the child can also apply for international protection for family members (according to § 26 Absatz 2 AsylG). The child might also be able to get a residence permit according to §33 German residence law (AufenthG) as a child of a recognized refugee.
Its mother might apply for a residence permit relating to the child's residence permit then (§ 36 Absatz 2 AufenthG or § 25 Absatz 5 AufenthG).
However, I also want to mention that I am not a lawyer and do not exactly know about the conditions, if the father is a refugee in another EU Country. Therefore, I would recommend to seek some legal advice, for example, in a migration counselling centre.
I hope this helps and all the best,