The current mRNA vaccines are moderately effective at preventing Covid infections, about on par with current flu vaccines.
Not all vaccines are equally effective, but none of them are 100% effective at preventing infections. The only thing vaccines do is prepare the immune system for an infection. Since SARS-CoV-2 mutations happen a lot faster than (for example) measles, Covid vaccines are a lot less effective - by the time you're infected, the infection is dissimilar enough to what the immune system was prepared for that the preparation is no longer optimal.
Not all vaccines are equally effective, but none of them are 100% effective at preventing infections. The only thing vaccines do is prepare the immune system for an infection. Since SARS-CoV-2 mutations happen a lot faster than (for example) measles, Covid vaccines are a lot less effective - by the time you're infected, the infection is dissimilar enough to what the immune system was prepared for that the preparation is no longer optimal.