Responses
It's probably "A Court Magician, Who Was Focused On Supportive Magic Because His Allies Were Too Weak, Aims To Become The Strongest After Being Banished".
This is becoming a really common trope tbh (probably due to the popularity of "Shield Hero"). I could probably find at least 20 other manga with a similar premise.
Ummm I am sure I have read a manga with the opposite happening.
A male mage was working as a court magician but the prince didn't notice his true value so he fired him.
Then a female friend found him and invited him to be part of his party.
The prince noticed his fault but was too arrogant to admit it so he kept causing troubles