Well you weight the side effects against the cost of just having the virus. For instance most children that are healthy and have their vitamins can easily survive measles and be immune for life, whereas if they take the vaccine they have about 45% protection for a few years and it starts going down from there. The side effects are things like:
* https://en.wikipedia.org/wiki/Guillain%E2%80%93Barr%C3%A9_syndrome
* https://www.drugs.com/sfx/measles-virus-vaccine-side-effects.html
Now polio is so deadly that I might consider getting that vaccine (in fact I did get it before I was eductated on vaccines). We now know that in Africa Bill Gates's polio vaccine is causing more cases than its curing:
https://www.westonaprice.org/studies-show-that-vaccinated-individuals-spread-disease/
https://www.the-scientist.com/news-opinion/polio-vaccination-causes-more-infections-than-wild-virus-66778