I have searched for this method and found that Shopify comes with it by default, which is actually enabling the filtering function for frontend display.
First, go here to enable this default filtering plugin. Some versions of Shopify have this plugin enabled by default when enabled on independent sites, just need to set the meta fields to display on the frontend, while others may require downloading and manually starting this plugin.
After activation, it is recommended to set the pin button of this plugin to be fixed for easy future operations.
After opening, follow the above steps, simply add the meta fields.
The meta fields are in the settings at the bottom left of the Shopify backend. After opening, follow the above interface, add the meta fields you need. Once you have added the meta fields, you can proceed with the steps in image 2.
It's very simple.