Dear @GRL,
thank you for sharing your question with the Wefugees Community.
If you have been married for a minimum of 3 years and then you have separated, you will get a residence permit for a minimum of one year. Similarly, after that your residence permit will be annually extended. From the second year they will ask you about your work and if you can find your subsistence by yourself in Germany.
So in your case, as you have mentioned, you were married for 5 years with your wife, you are on the safe side. That is also very good that you are working. As soon as you also get your B1 German language certificate and complete the other requirements for a permanent residence in Germany, you can then apply for it and get it.
Here is also a link about it in English: https://se-legal.de/residence-permit-non-eu-citizens-after-divorce/?lang=en
I hope my answer was useful for you and I'll be very pleased if you contact me again with further questions. I'm a member of the MBEON-staff and I‘ll be glad to guide you over a longer period of time. Mbeon is an online consultancy for migrants via the mbeon-app, which you can install on your smartphone for free. Download it via App Store or Google Play Store. You'll find me In the mbeon-app under my name „München, Herr Noori“ and get confidential one-to-one advice in a safe virtual room where nobody can wiretap messages. Further information: ***.mbeon.de.
Best Wishes
Fardeen Noori