The way to automatically hide out of stock products is through automatic collections which you may have already set up.
Automatic collections work based on conditions, so if you're tracking stock for your products you need to make sure to add a condition to each collection that says inventory stock is greater than 0:
That way, any products that go below 1 in inventory will be automatically removed from the collections. Have you tried this already?
Also, please do tell me a little bit more about your store and products, I will see if there is anything else I can be of help with!
Lana | Social Care @ Shopify - Out of Office until Jan 2nd / Was my reply helpful? Click Like to let me know! - Was your question answered? Mark it as an Accepted Solution - To learn more visit the Shopify Help Center or the Shopify Blog