Thank you for your question and Welcome to the Wefugees community!
As we've had a few questions related to changing your status and studying in Germany before, please have a **** at the following threads from our platform:
Is it possible to get a student visa?
Do I have to leave Germany to apply for a Student Visa?
On the first thread, our experts explain that you may have to leave the country in order to apply for a student visa. Since this is a legal issue, they advice to contact a Refugee Law Clinic in Germany (link on the other thread). You can also reach out to a pro bono legal aid service as listed here: ****://***.refugeelegalaidinformation.org/germany-pro-bono-directory
I hope this information helps and you find the necessary legal advice. Another option is to contact your university (the international student support service, for example) for more information regarding your options. Feel free to reach out to us again if you need any further assistance!
All the best and Good Luck,