The new mRNA vaccines are the result of extensive research over the past thirty years or so. They are marvels of technological innovation but probably not just for the reasons you imagine. The basics of therapeutic mRNA synthesis have been around for about ten years but the problem was how to get the RNA into cells. That requires specialized lipid nanoparticles and making those has been the most recent technological advance. A lot of this research was done in Canada. I found a nice paper (Buschmann et al., 2021) that covers this research and I'll summarize the important points for those of you don't have time to read it.
Normal messenger RNA is susceptable to nuleases and is not readily taken up by human cells. In addition, it elicits an innate immune response that results in supression of translation through phosphorylation of eIF2a. The immune response can be blocked by incorporating modified nucleotides than are not recognized by the various receptors that stimulate the normal response. This was discovered over ten years ago. These modified nucleotides, such as N1-methylpseudouridine, were used to make the SAR-CoV-2 vaccine.