Hide category on shop page

Please advise, I’m looking for a way to hide products from a certain category on a home page. I I have tried a solution from this page but it didn’t work.

https://www.hardworkingnerd.com/how-to-hide-a-category-from-the-shop-page-in-woocommerce/