Dear Kanteh Alagie,
Welcome to the Wefugees Community and thank you for reaching out to us.
According to the German Residence Act section 19d:
(1b) A temporary residence permit issued pursuant to subsection (1a) is revoked if the employment relationship on which the issuance of the temporary residence permit was based is terminated for reasons relating to the person of the foreigner or if the foreigner has been convicted of an offence committed intentionally in the federal territory; fines totalling up to 50 daily rates or up to 90 daily rates in the case of offences which, under the Residence Act or the Asylum Act, can only be committed by foreigners are ignored as a general principle.
Therefore, I would strongly advice you to get indivudial legal (lawyer or a experienced counselling office) support. You may need to prove that it is not related to you as a person that your employer ended the contract. But I am also not an expert on this kind of residence permit. I will link our dear @mbeon-christine here. Maybe she can give some further information or advice.
In any case, please don't hesitate to get back to us with any further questions.
All the best,