Herd immunity and who gets the vaccine first
When a large subset of a population is immune to a disease, it can provide protection to the 'herd' that is not immune. That threshold, when herd immunity kicks in, is different for each infectious disease and can vary from 50 to nearly 100 percent. What determines this threshold is what’s called the R Nought or R0 (rate of transmission). The more the R0, the greater the immunity threshold.
For instance, if you take polio and smallpox, the R0 was 5-7. And the herd immunity threshold was 80-85 percent of the population. Being a very severe disease, it has taken us 100 years to achieve that, not through acquired immunity via infections, but through vaccines.
Read more here