You can prevent the spread of hepatitis B by getting vaccinated. The vaccine is given as three or four injections over six months. The vaccine is recommended for:
Newborns
Children and adolescents not vaccinated at birth
Healthcare workers
Anyone with an STI
Individuals with chronic liver disease
End of stage kidney disease
Intravenous drug users
Sources:
"What You Need to Know About Hepatitis B." Johns Hopkins Medicine Health Library. Web 16 Jun 2018.
"Hepatitis B." Mayo Clinic, Mayo Foundation for Medical Education and Research, 27 Oct. 2017. Web 16 Jun 2018.
"Viral Hepatitis." Centers for Disease Control and Prevention, Centers for Disease Control and Prevention, 22 May 2018.Web 16 Jun 2016.