Each option keeps its own stock
Size, color or any other choice holds its own quantity. Filters then hide values that are gone.

A size-42 boot should sell out of 42 — not the whole product. Option stock does that. You set Quantity on each value, on the product itself.
Open a product. In Product options, turn on Count Stock. Then set Quantity per value. Price can live there too. Save.
Create the options first under Products management → Product options. Filters live next to that list: Products management → Filters. After you count stock, those filters only show values a shopper can buy.
Stock is not on the options catalog. It is on the product. Skip Count Stock and the storefront still treats the product as one pile.
Questions about option stock
Try option stock on your store
Already in the admin. Open a product and turn on Count Stock.