Okay
  Print

Display/ Disable out of stock product

If you set: Inventory/StockOptions/Display Out Of Stock Products = NO

But the unavailable products are still visible on category pages, you can use this article to display or disable product out of stock in magento 2: 

https://magento2tutorial.magestore.com/magento-2-displaydisable-out-of-stock-product-by-your-own/

It will help to resolve your issue.