Is natural immunity - the kind of immunity you get from actually getting a disease - better than immunity from a vaccine?
All things being equal, sure.
Unfortunately, all things aren't equal when it comes to the question of natural immunity vs 'artificial' immunity. Vaccines are safe and have few serious side effects, while vaccine-preventable diseases are life-threatening and can leave survivors with serious disabilities.
For most of us there is no question. Our kids are fully vaccinated and we are very glad that they have artificial immunity against measles, Hib, pneumococcal disease, and hepatitis B, etc.
For more information: