Vaccinations play a crucial role in cancer prevention. The HPV vaccine protects against the human papillomavirus, which is linked to cervical and other cancers. The hepatitis B vaccine can prevent liver cancer by reducing the risk of chronic hepatitis B infection.