All that if you want is not to show the "Add to cart" button. You will be in need to remove the block responsible for adding that on details page.
Have a look at this file:
The block adding "Add to cart" is:
** Do not make change in vendor you need to override the same in your theme and remove that block.
If you do not want to remove it you can have a look at:
Again do not change in vendor override this file and you can apply condition/change as per yours need.
But with this changes will only be applicable on product view page. In order to perform customization on list view, have a look at this file:
If stock reaches "0" and if from backend you have set not to display out of stock products then ideally it should not display.
You can try by reindexing:
php bin/magento i:rei