“If an item in the inventory is sold or deleted, the stock count will be updated from the database” –
It’s not about that. This is not a generalized OOP recommendation, this is about the kinds of relationships that arise in certain domains.
If an item is sold out, you still can go to the database and query the price or details of that product. The table that stores product details, as well as the stock count is a description of a product. But sometimes it’s not enough to just store the count, sometimes you need extra data, perhaps better represented by a separate table or an object. Again, this whole discusion is not really related to OOP itself, it’s about domain modeling.
E.g., suppose you’re selling stuff online. You may want to keep generalized product descriptions & specs (something that people might search for) separate from data about the concrete items you have on stock (e.g., these might store info on whether the item is new or second-hand, if it’s damaged, a note about the item itself, etc.)