There are 2 possibilities to your question.
1. You are taking favoritism as recognition.
If this is the case then, managers are focusing attention on particular employees, it’s because of their work and their growth opportunities and unique skill sets offered over others. In this case, talk to your manager directly your problem and find out the reason to overcome them. Quitting for such a reason is not necessary.
2. Favor to only a few employees in the team.
By not treating everyone equally, a manager is fostering a sense of resentment and separation that can de-motivate employees and damage team unity. In this case, you can shift your team or quit it's very hard and cannot take any more.