How to save current appended fillter to collecttions page to display it current state

How to save current appended fillter to collecttions page to display it current state

like what i selected

so i have 4 filters

tailaitai_0-1652185568652.png

date sort, brand, category and a price range

tailaitai_1-1652185599255.png

so all of this filters is displayed in adress bar

and i need to save information about selected option so i can display what is currently selected on page

how to do it?

here is example of 2 filters:

<select
name=“brands”
id=“brands”
onchange=“FILTER.searchParams(event, ‘filter.p.vendor’)”

ALL {% for product_vendor in collection.all_vendors %} {{ product_vendor }} {% endfor %}