Dear @Smile,
Thank you for sharing your questions with the Wefugee Community!
I assume you were holding the so-called "Ausbildungsduldung" according to § 60a Abs. 2 S. 4 ff. AufenthG?
In general, the residence permit following §18a AufenthG (which people normally apply for just after holding the Duldung I mentioned before) will be issued for two years.
According to this source (Refugee Council of Lower Saxony/Flüchtlingsrat Niedersachsen), you can apply for an extension of the residence permit as long as you meet the requirements (those you will find here in detail).
If you are holding a valid travel document and you have a visa (if needed/ please check conditions of individual countries) you should also be allowed to travel for a certain period.
I hope this helps and feel free to get back to us with any further questions!
All the best,
Meike