When using configurable products, there are multiple simple products. Each simple product has its own stock. A configurable product does not have stock and is really a virtual product. It's not an actual product but an instance that can be shown in the product list. Customers will always have to select a simple product when purchasing.
Go to: Stores > Settings > Configuration > Catalog > Tweakwise.
In the Export section, look for Combined product stock calculation mode.
These options are available:
- Sum: the sum of the stocks of all the simple products (almost always suitable)
- Maximum: the simple product with the highest stock will be used
- Minumum: the simple product with the lowest stock will be used
