It remains to be seen if most people will even get vaccinated if/when a safe and effective vaccine becomes available.
Even if people got vaccinated once, to actually eradicate COVID-19 they might have to get revaccinated multiple times, possibly over a span of years. We can't even get everyone to get flu shots. Getting everyone to get a new vaccine to a disease towards which there's so much disbelief will be even more difficult.
We eradicated smallpox, but that was a fluke. Take a look at the eradication efforts towards HIV, measles, and polio. Much more progress could be made on these fronts, but paranoia, ignorance, and long-held beliefs and behavior patterns stand in the way.
Even if COVID-19 itself is eradicated, something else to consider, that virologists have been pointing out, is that there are plenty of other coronaviruses in various animal species that could make the jump to infect humans, possibly causing another pandemic which is just as bad or even worse.
A major shift in thinking and priorites has to happen globally, on many different fronts to make humans less vulnerable to this kind of disease in the long-run.