Praise be to Allah.
When choosing a specialty, you have to pay attention to a number of points:
Your personal abilities: do not choose a specialty that does not suit you, lest you fail.
The need of the Muslims for this specialty: so that you can try to fill a gap in the Muslim community/Ummah.
Your own inclinations: if a person has the inclination and desire to learn, along with the ability to do so, it is very seldom that he does not succeed.
The specialty should be free of things that go against sharee’ah. As for specialties in forbidden fields such as music, philosophy, etc., it is not permissible to enter them at all.
Then seek the help of Allaah to make the right choice, make sure that your intentions are proper, and at all times put your trust in the Most Generous, Most Merciful.