There is no right or wrong answer but I personally do prefer to see some stability at least at 1-2 companies if you are senior. Reason is that unless you have spent at least 2-3 years at one company/team, you haven't come across bad stuff like tech debt, things becoming more complex/stale, data challenges, version/compatibility issues etc etc. If you keep jumping ship every 1-2 years, it tells me you have never worked on those challenging/boring issues and I wouldn't want you on my team.
It is much easier to work on shiny stuff and jump ship than taking ownership of crappy stuff. Remember, what is shiny initially can become crappy over time and I want engineers who have been through all of it. Not just the good parts.