The immune system is a biological system in an organism consisting of a coordinated set of elements of recognition and defence that discriminates against the self of non-self. To resume, the immune system protects us against infection from bacteria, viruses, fungi, or parasites.
Back to the hypothesis: If a higher percentage of people are immune to a disease, then the rate at which a disease spreads is lower because the immunized people carry fewer infections so it cannot be spread between people.