Thank you for reaching out and for bringing this up.
As a first step, let’s try a few things to confirm the issue you have.
The out of stock badge counts the quantity of the variable product and not the quantity of variations.
In this case, you would have to handle stock at a variation level instead of a product level.
To set it up, when editing the product, please go to
Product data → Inventory and make sure the Enable stock management at product level feature is disabled under the Manage stock? option.
Image URL: https://i.ibb.co/LhN7N9c/madkmads.png
Then, go to
Product data → Variations, and on each variation, kindly check if they have the Mange stock? option enabled and have the number of items left on the Stock quantity field.
Image URL: https://i.ibb.co/FxZJCL9/ndsjnsdj.png
If these are the settings you have on your site, it should display the stock left on each variation, not on a product level.
Image URL: https://i.ibb.co/Gs5ptdc/jsfjkadskjo.gif
Could you please confirm if this is working the same way for you?
Let us know!