category/tag & URL structure on Shopify is fixed - and will not change regardless of the code we use.
so in Shopify it's
The above code is kinda old but should work to generate a sidebar menu of filters.
with shopify you kinda have to use pseudo categories / subcategories which takes a while to get your head around if coming from other platforms.
But you can see something similar (but a lot more complex code) https://kerry-food-services.myshopify.com/collections/all