Hello,
You are welcome. Go to WooCommerce > Settings > Products > Inventory > check Hide out of stock products from catalog.
Regards