Dear @Mohamed14,
Welcome to the Wefugees Community and thank you for your question.
As long as your asylum case is not closed (and you are holding a so-called "Aufenthaltsgestattung") you can not apply for a residence permit. But that also means that you are safe for the time being and the authorities will not ask you to leave the country.
In case the court is rejecting your appeal, I was thinking that a residence permit according to §18a of the German Residence Act might be an option for you. We discussed the conditions for that residence permit already before on this platform. You may want to see, for instance, this thread for more information. For the so-called "Ausbildungsduldung" which normally leads to a residence permit for 2 years to continue the work after you completed the Ausbildung/vocational training, you need to hold a "normal" Duldung (as consequence of a failed asylum procedure) before.
I will also link two of our wonderful experts here. Maybe dear @mbeon-Christine or @mbeon-Bernd can also add on that.
I hope this helps and please don't hesitate to get back to us with any further questions.
All the best,
Meike
P.S.: I saw that you opened another thread with very similar content. In order to keep a better overview and information in one place I closed that one. I hope this okay for you.