Design patern. Write funtion on effector or affector class?

I strugle with this as to what is best. Lets say that we have a Inventory and an Item class. Would it be best to write a funtion in the Inventory class like “AddToInventory(item:Item)”, or write a funtion in the Item class like "PutToInventory(inventory:Inventory) ?

or both?

It may sound a stupid question, but I was wondering on best practises and why.
Thanks

I tend to do both.

I’d probably have the Inventory do the actual action then make the Item method just point to the inventory one, so even if I - or my colleagues/end-users - don’t use it exactly as intended, it will work anyway.