How to I configure out of stock products from being sold

Is there a way to configure product that are out of stock from being sold?

Instead of having -23 in stock, when stock is zero should not be sold.

A product that has 10 items in stock can be selling before it in stock. But when is 0 can not be sold because it is out of stock.

It’s a link, not a question.
There are several topics on forum already about limiting orders that are out of stock.

Can you share any please. It important to me.

Thanks in advance.

Why not try the forum search or the topic in the link posted above…