Disclaimer: None of these thoughts are original they've almost certainly been thought before and explained in a better way. If you're aware of a case of this please email it me so I can link to it here.
Success is a matter of three things, 'Talent', hard work, and 'luck' - Talent is mostly genetic, You also need an environment that fosters and nurtures your natural talent, these things can be considered 'luck' You could also discredit hard work in a similar fashion if you're a determinist but that's beside the point.
Comparing yourself to others isn't fair to yourself because you can't possibly compare the two, Because no two people have the same starting conditions, the same environmental conditions and the same level of luck. So why would you ever compare yourself to others? because society encourages it, because it can be a quick form of relief 'Things might be bad but it could be worse I could be x' But since you can't accurately put yourself down by comparing you to others, elevating yourself by comparing yourself to others also isn't fair, it's just a biased way to elevate your own ego. inflating your ego by comparing yourself to others is a trap, You get cut by it more than you're inflated, then your inflated ego is based on bias not reality, and the comparisons that tear you down are also controlled by bias.
Now lets talk about the shaky foundation of comparing yourself to yourself, progress isn't linear and regression should be expected in any for of long term progress, there will always be growing pains, hiccups, issues that come up.
The point of this is to say don't build your sense of self worth on things that're unfair like comparing yourself to others or others to you, or to allow any kind of stalling or step backs in progress make you feel bad about yourself. those comparisons aren't fair and neither is seeing any regressions in your progress as failure.