A nurse is educating a parent about the importance of routine childhood immunizations. What is the primary purpose of vaccinations in children?