In order for the cart to manage your product variant inventory you need to enable the “Inventory Management” features in the Store Settings under the General Cart setup section. When “Enable Inventory Management” is enabled the cart will check for available quantity on hand, if quantity on hand for a product variant is less than the quantity the user has added to the cart, then the cart will display an “Out of Stock” message and not allow the user to proceed past the cart screen.