That's the right attitude. the skills and knowledge your will acquire in your current role, will help you land a good jump.
A lot of people here in this forum are insecure about their salaries and resort to comparing themselves to feel better about themselves. I am of the view that this is very disrespectful, not only to the person with which they are comparing their salaries but also to themselves.
Everyone has their own journey, their own struggles, their own circumstances due to which they are where they are right now. Let's not compare our journey with theirs. Let's learn from them on how to improve ourselves.
Most of the folks are kind of fresh graduates and they lack peer to peer learning. In my first 8-10 years of career, I can make frequent job changes and jack up my salary. But there comes a time where expectations of the companies change. For someone in middle management, companies want to see how I owned charters, turned around things, made some bold decisions and stayed in the company to see the results of my decisions and my learnings from them. It only happens when I spend about 4-5 years in an organization. Companies want to see candidates with self realisation of their growth and mistakes. It won't come if sole focus is on frequent job change to increase salary. The wheel has to stop somewhere.