Precisely. Another example is the ban on DDT, which has caused the deaths of a million people from malaria. Thank you, Rachel Carson. Indeed, it is a "Silent Spring" when your village has been wiped out by malaria.
Another example might be excessively stringent restrictions on arsenic in drinking water. You can waste millions of dollars achieving ridiculously low levels, and maybe save a couple of lives. But those millions of dollars might save thousands if spent in other ways. That is also an example of "opportunity cost".