Nope. All a vaccine does is generate antibodies/immune cells that are specific for the antigen that is part of the drug. The efficacy of the vaccine is completely separate from whether it is or is not a vaccine. There are cancer vaccines in development to create antibodies against tumors, although they don't seem to be sufficient to clear the tumors.
The issue with the Covid vaccine was the rate at which Covid evolved. So the initial vaccine was for specific antigen sequences, but Covid eventually evolved to render the vaccines less effective. It's the same reason we can't just create an HIV vaccine. With that said, the reason Covid was a dangerous disease is that it was a completely novel virus. So the vaccines offered a level of partial protection even against the evolved virus variants that limited serious disease.
If we were to get into a military conflict and a new variant of Covid emerges that is going to cause a widespread flu-like outbreak, it would be in the best interest of the military to quickly deploy a new vaccine update that targets the new variant. That's why mRNA vaccine research was initially funded by DARPA.