The spread of infectious disease is a dynamics problem, as is eradication.
It doesn't require 100% effective vaccines nor 100% coverage of vaccines to wipe out an infectious disease, typically it requires far less.
Break it down to the simplest terms. On average in an environment where nobody has immunity to disease an average infectious person will spread the disease to N other people, this is the "basic reproduction number" for that disease. If that number is more than 1 then in a simple model more people will get the disease over time, the disease has the ability to spread. If that number is less than 1 then fewer and fewer people will get the disease over time, leading eventually to eradication.
If you introduce immunity into the situation via vaccines then you change the whole scenario. If, an infectious person has a chance to infect some number of people but now most of those people are immune, the disease won't spread to them, it'll instead only spread to some of the people in the non-immune subset. Meaning that the effective reproduction number is reduced. And if that number is reduced below 1 due to immunization then on average the disease won't spread, it will die out. Infectious diseases rely on luck, and we can hurt their luck substantially with mass immunization programs. All that matters is pushing that effective reproduction numbers across the line from above 1 to below 1, and then ordinary population dynamics will play their part. This is how "herd immunity" works. It doesn't require 100% of people to be immune, it just requires enough immunity to flip the switch between a disease that is commonly circulating in the bulk of the population (measles, polio, HPV, etc.) to one that does not circulate and only a very small number of individuals may have at any time.