The vaccine prevents infections of the original dominant variant, but since it was developed the Delta variant has emerged (thanks to people who weren't vaccinated) which is capable of breakthrough infections. However, these breakthrough infections are still of much lower severity than if you are not vaccinated.
The booster shots are normal for vaccines and don't indicate that the original vaccination is totally ineffective, just that you're even better off with one. Plus, ideally, companies will keep working on new vaccines for the new variants. However, had every country followed the lead of countries like South Korea and followed sound protocols from the word go, then perhaps the Delta variant would never have emerged.
Hope that clears up some things for you.