Dear Sofia waqas,
also from my side a thank you for sharing your question with the Wefugees Community.
The topic of getting the German citizenship as a refugee was discussed already many times on the platform. You may want to see, for example, this thread for more information.
Depending on the individual cases, a minimum legal stay in Germany of 6-8 years will be required for the application. Unfortunately, the period you were holding a Duldung will not be counted.
I hope this helps and as our expert mbeon-Christine mentioned, you are very welcome also to contact her via the mbeon-App.
All the best,