If you track inventory on Shopify and you don't allow your customers to buy when the product is out of stock, normally the themes will display an "unavailable" button.
Documentation here: https://help.shopify.com/en/manual/products/inventory/track_inventory