Well, this sure has rung true for me in my career. I have seen others get promoted when I was doing as well or better than they were. What I noticed was those who got promoted engaged in self-promotion. Not a bad thing at all, just that to get what you want you need to tell those above you what you want to do. If you want to get promoted, you need to talk to your boss about it and ask what things you need to do in order for your boss to recommend you for promotion. Being humble is admirable, but it can hold you back.
An excerpt from the article on this is below the link to the article.
Positive trait that can hold you back
In a perfect world, your completed assignments would speak for themselves. You’d work on friendly, collaborative teams with fair-minded co-workers, and each person would be free with praise and full of self-effacing humility. You’d never have to worry about self-promotion or navigating office politics to get your due.
But the reality is that you need to speak up. Generosity and a humble nature are great attributes to have, of course. They help you keep a team-first attitude, improve your leadership abilities, and generally endear people to you as a professional.