That really depends on what illness you are trying to combat. Certainly, something like smallpox, vaccination would be the way to go. German Measels, meh, until we had the MMR *** we worried less about it and basically went for naturally obtained her d immunity.
Presently, scientists appear split on Covid, but it's worth noting that none of them are advocating that we *don't* use a vaccine, they just differ on how we get there given the different risks to different sections of the population and balancing the possible harms of things like lock downs.
Unfortunately, the Guardian has embarrassed itself by printing nonsense bout herd immunity being an imaginary thing being advocated by evil fascists or something, so it has become a loaded word.