We just can’t help comparing ourselves to others.
It’s not your fault - it’s innate.
From an evolutionary psychology perspective, comparing one’s self to others ensures that we are doing the right things (and not doing the wrong things) in order to survive.
The problem is that in a world where we’re all doing relatively fine, this tendency is problematic.
We take a hit to our self-esteem when we compare to people that are "better" than us.
To ensure that social comparisons are helpful instead of hurtful, we have to take the thought process a step further.
What sacrifices have they made? Is that really what I want? What knowledge, skills, or abilities do they have that I don’t? Is it realistic to acquire those talents?
Social comparisons can either be depressing or facilitate growth. The choice is yours.