The former seems way more acceptable to me
This is only because you haven't through this through. "detrimental to public health" is not nearly as objective as we need it to be. Instead, it is often a substitute to "advantageous to financial interests of a pharmaceutical company". For example, opioid epidemic and false claims that oxy is not addictive.
Who made claims that oxycontin isn't addictive? The government? No. The manufacturer. The government merely allowed them to do it until their claims were shown to be false.
Spreading claims that would encourage a pandemic to get massively worse by discouraging vaccination falls squarely under "detrimental to public health". At no point were *legitimate* studies that showed safety concerns in any way squashed to favor any company's interest. That's why we know that vector-based vaccines were responsible for a statistically significant number of strokes and heart attacks in otherwise healthy people.
The studies that were squashed were a bunch of very weak, mathematically garbage studies that contained errors so obvious that even I, a non-medical person, could shoot dozens of holes in their methodology. A small number of individuals were behind publishing fraudulent study after fraudulent study, and they kept doing this despite broad consensus that their methodology and their conclusions were pure, unadulterated bulls**t. They did this by publishing in journals significantly outside the areas that were appropriate for the papers, relying on the journals' lack of people with adequate understanding of the subject to shoot it full of holes and recommend not publishing it.
And these folks had a tendency to go on YouTube and spread their bulls**t, using their publication in a "journal" (of physics, social sciences, psychiatry, chiropractic medicine, etc.) to support their absolutely fraudulent claims. YouTube quite literally became a dumping ground for trash science that made the National Enquirer look like respectable journalism by comparison.
It got to the point where my canned response was, "If you are showing me something in a YouTube video instead of a peer-reviewed journal, I automatically assume that what you are saying is pure, unadulterated bulls**t, because out of the roughly one hundred times I have not made that assumption, I have found it to be true every single time. If you want me to read it, write it down, so that at least I can skim it in three minutes and point out why you are wrong without wasting an hour of my time watching your stupid video."
IMO, YouTube was right to crack down on that. When people without medical degrees are basically giving medical advice that contradicts broad medical consensus, this is almost guaranteed to be harming society. And nothing good can come of that. Children dying of measles, smallpox, polio, and other vaccine-preventable conditions is not something we should aspire to. Regardless of whether they have freedom of speech, that doesn't mean companies should be required to be their megaphone. And regardless of whether the government was the group who pointed out how potentially harmful the things they were saying are, the stuff they were saying was still harmful.