Dear @Bright_love,
Welcome back to the Wefugees Community and sorry for the rather late reply.
Unfortunately, I am not too familiar with the EU/freedom of movement law (and how to apply on family members), but I know it would be easier to obtain a residence according to this regulation, if you and you girlfriend would be married (and she is entitled to the respective "freedom of movement" due to her or your status as an employee). I will link two of our experts here: Dear @mbeon-Rukundo or @mbeon-Christine, can you give further information on this topic?
You all live together in Germany, right? Another option might be to apply for a residence permit according to section 25 (5) of the German Residence Act. Do you agree @mbeon-Rukundo or @mbeon-Christine?
In any case, it will be essential to officially recognize the paternity/fatherhood, to share the custody and actually taking care of the child.
All the best,
Meike