The German Government is working to enable people from Afghanistan for whom it bears particular responsibility to exit the country safely and travel to Germany.
If this applies to you and you have already left Afghanistan, you can get in touch with the German Embassy in Islamabad or the German Consulate General in Karachi by using the contact form.
Additional information is available here.