I really believe if your career goal is to peak a lot higher than just middle-management or senior software engineer, and earn the pay that comes with those higher positions, you need to stay on the same company and even same project for much longer periods of time (I would say 5 year absolute minimums). If I look around at the careers of Distinguished Engineers and senior principal engineers, or VPs of Engineering at FAANGs, etc., these people always have massive chunks of time at the same company, often many years on the same product even. If they have changed companies a few times in their careers, it’s after a string of promotions and delivering big things. It is really hard to build a portfolio of high-level impact with 2 year stints.