Incidentally it can also work at your existing company. I’ve gotten 5 promotions in 6 years and my salary is 120% more than when I started. It’s less the company hopping part and more ensuring you grow in your career. I’ve found that it’s definitely about stating your desires (having a clearly defined “this is where I want to go in my career”), volunteering for the random projects your boss or their boss needs done and showing you want to grow.
That only works if you have managers that give a rip about helping you grow and compensating you well for that growth, which sadly, most people don't have.
In my experience, staying at the same place and taking on more "growth opportunities" was just an excuse for management to throw more on my plate without compensation increases. Sure I would get a little raise sometimes, but it was always pissy amounts of money, even when I asked for more.
I started jumping jobs aggressively and magically my pay exploded upwards. I now have basically zero loyalty to the companies I work for, just like they have for me. Contract work is even better for this, but the downside is usually you have bad or zero benefits.