How do you guys cope with the fact that less skilled people can earn way more than you because they were at the right place at the right time ?

I have seen this trend way too many times especially withe freshers and less experienced people complaining that the other person can’t even solve LC medium but I can solve LC hard and yet they earn 2x more than me. Or even a less experienced co worker with really bad knowledge about software engineering making more than you. As people get to around 3 or 4 YOE they realize that it is possible but it should not bother you more than giving you some motivation to switch.

In my case I felt kind of angry surprised and confused when I use to work in a WITCH and they had two profiles one was the 6.75 lpa profile and the other a 4 lpa profile. I joined the 6.75 one and my friend the 4 lpa one. After a year and a half only the 4 lpa one got an option to increase their package from 4.5-6.26 by then my package became 7.25.2 years after joining my package was around 7.85. Now comes the funny part my friend’s package also became 6.75 after the small hike everyone received but he was still a designation lower than me. He then completed his 2 years and got a promotion and a hike of almost 2 lakh rupees making his package 8.5 higher by about 10%. That’s when I switched not because I was jealous or I had a competition with him but because there literally was nothing the stupid service based company had to increase your salary except for the normal hike cycles. My friend got an option to increase his compensation but I didn’t. It was more of an oversight by the HR but this was a really stupid thing.

Now I won’t probably bother about all this and just switch when I feel like it.