OP, I was your colleague once.
Myself and a colleague started our posts at the same time, same role, same company.
I had the experience and knowledge my colleague didn't and because of that people came to me with questions, applauded my work and I was seen as 'better" at my job.
The problem is, I rested on my laurels. I stopped learning. I sat back and assumed I knew it all (ashamed to say!!). I enjoyed giving advice, being the knowledgeable one....
My colleague on the other hand quietly got on with her work but also made an effort to learn. She wasn't bitter or jealous (that im aware of anyway!) and spent time making opportunities to learn from me. She also made time to learn from others, to put herself forward for training, to learn in her own time, to improve all her skills, and to grow within her role.
Do you know what happened? She surpassed me eventually. I had stopped learning or bothering to improve myself. I produced a lot of work and worked hard, but I stopped trying to learn and develop. My colleague however, quietly grew, learnt and developed. She became really incredibly skilled and although I left that post (for unrelated reasons), I'm pretty sure she is continuing to fly in the role.
I learnt a lot from that experience and from watching that colleague and I will never be so arrogant again! She had poise and grace, didn't worry about me or what others thought, and just focused on herself and being the best version of herself she could be. It paid off.
Now I have a son who's into a sport big time. And I've used my experience to try and help him. He is definitely the underdog. He never wins despite loving it more than any of his team mates and working the hardest. He never gets recognition or praise from coaches, never gets medals. He has team mates always getting medals, praise and having their faces in the local paper for their achievements. I am teaching him to focus on learning. Use this time when the spotlight is not on you, when you are the underdog and have no pressure or expectation to be at the top, to focus on developing yourself to be the best you can. Dont look around at everyone else and feel sorry for yourself that you aren't getting the recognition, the medals etc .. Focus on developing you, on learning, on hard graft, on honing your skills and talents, and maybe one day, the hard work, the learning, the development will pay off.