Herd immunity is reliant on immunity from a disease. Immunity can be achieved in one of two ways: prior infection or vaccination. In many cases, relying on prior infection is an unrealistic—and even dangerous—way to reach herd immunity. That's why vaccines are essential in the fight to establish herd immunity.