I think if you sell using variations, that you can enter an amount for each size, colour design etc.
I've never used variations, but I suspect you can set them up to show as out of stock or not available when the buyer tries to select one that has become out of stock.
Hopefully what you need is explained in the help page below, or a seller well-versed in this can help you:
https://www.ebay.co.uk/help/selling/listings/creating-managing-listings/multiquantity-listings-listi...
“We haven’t got a plan so nothing can go wrong!” Spike Milligan