The big thing with the mRNA vaccines is that they don't target the virus per se. They target the "hooks" the virus uses to attach itself to the host. Meaning they don't teach the body how to fight against "strain X" of the virus. They teach the body how to prevent viruses that use a given method to attach itself to the body from doing so. Traditional vaccines only do this against specific strains, which is why for example the Johnson & Johnson and Astra Zeneca vaccines have been so poor against the Indian delta variant, but Pfizer & Moderna have worked quite well against it too, despite it not even existing when the vaccines were developed. And chances are, they will work against most future variants, because of the way it works - blocking the attachment method, not teaching how to kill "this-very-specific-thing".
And again, the primary goal of all the corona vaccines is that you will not get seriously ill from infection. You can still get it, but instead of killing you, or putting you in ICU for 3 weeks, you'll have just a sore throat for a few days, or even no symptoms at all. But don't forget, you can still be a carrier, as there is still no evidence that vaccinated people are non-infectious. That's why they still recommend everyone to wear masks until we reach a global (well, mostly) 70 % vaccination rate, which probably first happens country by country, and later continents will become herd immune, and so on...