There is no way to pass data between pages with Next's router
You would have to either use query strings as you mentioned, sessionStorage, or a state management option like Redux or React's Context API.
You could then put that in your pages/_app.js file which would wrap all pages so then you'd have a centralized state management solution.
With this pakage can using it