The easiest way is wait until the morning to put your garbage outside, instead of the night before. Or put a heavy rock or a brick on top of the lid. A bungee cord around the handles to keep the lid on works too. Or you can put mothballs in the garbage; raccoons don't like their smell.