We had a raccoon (”Ricky”) getting into our trash. The cans were large, plastic with wheels & the tops fit over the cans by a couple of inches. I don’t know how he was getting those tops off!
I came up with “Ricky Wraps”. I took rope, similar to clothes line variety & put it around the can vertically. I had a loop in both ends. The ends did not meet - I connected them with a heavy duty black rubber bungi cord stretched pretty tight. We had 3 trash cans & all 3 had Ricky wraps. I loved it when I saw Ricky footprints all over the cans & the tops were still securely on! :-)
Yes, I figured I can use a bungee cord over the metal trash can lid, from handle to handle. Or I can bend the metal a bit and make it a tighter fit.