Here is a fantastic piece by Katherine Wu with a great rundown on vaccine immunity, viral mutation, what happens after a booster dose, and why you shouldn't wait for an Omicron specific booster.
You'd be well served this pandemic just reading everything Katherine Wu and Ed Yong write.
I've made this point before, but the general vaccine and boosters don't necessarily need to be tailored to variants of concern to be effective against them.
The vaccines generate a polyclonal immune response. The vaccine doesn't just help your immune system create one type of antibody or T-cell for one part of the virus, but a whole host of different antibodies and T-cells that target different epitopes.
Even when the virus mutates, there will generally be parts of the virus being targeted that were conserved from the vaccine strain. Even antibodies that have weaker affinity due to mutations can still have an effect in sufficient number. The cellular immune response is particularly robust in the face of coronavirus mutations. As such while effectiveness against infection may decline due to decreased antibody neutralization, effectiveness against disease can remain resilient in the face of variants.
Boosters improve this process by increasing antibody numbers and assisting affinity maturation helping to create antibodies that are stronger and broader against different variants.
Our best bet to reduce coronavirus mutations and the chance of variants like Omicron emerging is to vaccinate the globe. Not only do vaccines reduce the chance of getting infected and thus prevent the opportunity for the virus to replicate and mutate, vaccinated people with breakthrough infections see less overall viral evolution than unvaccinated infected.
Countries with higher vaccination rates have much less viral mutation.