You could use app.bookmark.create:
What you would do is create a bookmark and save the id you get back (that is you get a promise back, when the promise resolves, you'll get the id. Save the id, and apply it later with app.bookmark.apply: apply method ‒ Qlik Sense Developers
You could use the selection state, in that case you would need to loop over all fields with selections, and save the selected values for all fields. When you recall the selection you would do it the other way around. This would be complicated in case there are many selections, using a bookmark is much easier.
Hope this helps