Vaccines can prevent a disease from happening in the first place. This kind of immunity is much safer and easier than actually getting the disease.