Some retail and grocery stores equip shopping carts with a device that requires a deposit before the cart can be taken out. This increases the cost of a shopping cart and is a hassle for shoppers to remember to bring change.
Humans are lazy and like free things. There’s the natural tendency to abandon the shopping cart instead of walking 10 meters to return it (hopefully you are better than this). People might also take the cart home but never bring it back the next time they go shopping. Sometimes it takes a little incentive for people to return their shopping carts,
In this situation I think the deposit works most of the time, but not so much because there is money involved per se. Convenience is something we want and it is a lot more convenient to return the cart so you can reuse your coin. Of course, there is still a minimum value for this to work (if all it took was a penny this might not motivate as many people).
There are some downsides to this system in that it is a hassle for shoppers but I think in practice if someone regularly visits a store, they will always come prepared. For one-off shoppers they probably won’t be buying much so there’s no need for a cart anyways. Thus this solution helps keep the carts tidy without much overhead.