Don’t know! AFAIK, some stock options do partially vest before two years. But this isn’t just salary, it’s career advancement, which means seniority and arguably experience, all of which tend to stay locked in for the rest of your career and lead to more stock options should you arrive somewhere you’re willing to stay longer at.
Idk about it being locked in. I have seen people with Sr and Lead titles interviewing for a lower position these days. Those things don’t always stay with you the rest of your life. But titles are cheap. Salary, bonuses, and stock are money.
For me, I had considered job offers with higher salary. But then when I looked at the salary and reduced PTO I realized my hourly wage didn’t change that much. When I factored in the stock package and downgrade in 401k match these 10%+ percent salary increases put me behind near term (near term being about 3 years until the new company started to vest and become regular earnings).