While you might be able to get a PAY increase by switching jobs, it's very unusual to get a job/responsibility promotion by switching jobs. If you're a Senior Software Engineer at Company X, you're going to be a Senior Software Engineer at Company Y. Nobody is going to hire you as Director of Software Engineering since you've never managed people before. However if you stay at Company X, maybe in five or ten years you'll gain their trust and get to start managing and working your way up the ladder...
Also, you can't just job hop infinitely and count on the same % raises each time you do it. Your salary will hit a ceiling. My first job hop was probably a 33% increase. Fifteen years later, my most recent one was about ~0.5%.
If I had a chance to do it all over again, I would have picked a solid company as my first employer and stayed with them as long as possible. I have a friend who's worked at Intel their ENTIRE career (will probably die there LOL) and is doing really well.