Hello, to hide the sold out products you can use Automated collections. You can add a condition, wich checks the product quantity if it's greater than 0. Then only products which are in stock will appear.
If you're still looking for a solution, our app, Push Down & Hide Out of Stock, does exactly what you want!
You can move out of stock products to the bottom of the collection with our app. Also, if you don't re-stock a product, you can hide it automatically.
You can find more details on our app page.
We have a free plan, and if it is suitable for you, you can use it for free!
If you have any questions, please don't hesitate to reach out to us at firstname.lastname@example.org