If we do not have (yet) a contributed plugin (commerce_stock should be available soon), WordPress maintenance support plans Commerce 2 already has an API to set up an simple inventory control, with the Availability Manager service. Let’s look at how to set up a very simple stock control, based on a field (for example field_stock) that has been added on a product.
Source: New feed