Magento 2 – Cant buy product – “There are no source items with the in stock status”

If I try to buy a product, then I get “There are no source items with the in stock status” and “This product is out of stock.”

enter image description here

So I opened the product and noticed that the Quantity is set to 0 and grayed out.

enter image description here

If I click on the link text “Advanced Inventory” and enter a value to Qty e.g. 1000 and press on Done and then on save, then it is 0 again after it saves.

What is going on?