First of all, this is completely normal to feel and please don’t beat yourself up for feeling this way.
We are all wired to think like this and you are not alone or an outlier in feeling this way. This feeling cannot be avoided, it can just be managed by analysing and tackling, so don’t run away rather embrace this.
Secondly, your promotion is not a measure of your ability or dedication, it is a factor of 100 variables and many of them are not in your control.
One mental model that helps is to think like a sportsman in a very competitive team, even the most talented ones are benched many a times but they still keep at it. There are so many cricketers who kill it at Ranji & nationals level but never get a chance to play for India. But they keep at it because of their love to the sport, so you should find a love/passion/drive in your work and just keep at it.
Also, believe in the fact that samay se pehle aur bhagya se jyada kisi ko kuch nahi mil sakta hai!