Dear @Pan 123,
Thank you for sharing your situation with us and I'm sorry to hear this happened.
As what you describe sounds very urgent, I would definitely recommend going to your university's support center, consulting a lawyer or asking a legal aid service for support in your case. Universities can usually help if you need financial or mental support.
If the father of your child denies to do the "Vaterschaftsanerkennung", you still have options. For example, the determination of paternity through court ("gerichtliche Vaterschaftsfeststellung").
Here is more information on the "Vaterschaftsfeststellungsklage". This source is in German but maybe a translating tool helps: https://ratgeber-vaterschaftstest.de/vaterschaftsfeststellung/
For more legal advice: there might be a Refugee Law Clinic at your university, or you can have a look at these pro bono legal aid services in Germany: http://www.refugeelegalaidinformation.org/germany-pro-bono-directory
In Germany, you also have the option to apply for child benefits: http://www.bamf.de/EN/Willkommen/KinderFamilie/Kindergeld/kindergeld-node.html
And here is another similar thread from our platform: As an asylum seeker what are the steps to take to proof paternity?
I hope this helps for now. Please feel free to reach out to us again if you have any more questions and definitely visit one of the options I listed for more support!
Kind regards, take care,