They don't need to be 100% effective, only reasonably effective. Take New Zealand for example. They have a population of about 4.8 million, yet have only had 25 deaths. Louisiana, a state in the US with a similarly sized population has had 5,375 deaths as of writing.
Just because the lockdowns in the US didn't work isn't a flaw of lockdowns in general; it's a flaw in the response of the US government. We needed swift, strong, decisive action, and we needed it when cases first started appearing. We didn't get that, and now hundreds of people are dying each day.