> A vaccine is a biological preparation that provides active acquired immunity to a particular infectious or malignant disease.
While most are prophylactic, it's not a requirement to be considered a vaccine. Vaccines are not "meant to prevent a disease". They're meant to provide immunity to the disease, whether that be before (prophylactic/prevention) or during (therapeutic/treatment).
But before symptoms you still have it so it's not only for preventing disease.
Vaccines are used to teach/modify your immune system to fight something. Whether you have it or not is not part of the definition[0].
[0] a substance used to stimulate the production of antibodies and provide immunity against one or several diseases, prepared from the causative agent of a disease, its products, or a synthetic substitute, treated to act as an antigen without inducing the disease.
There are many vaccines that can be given after exposure, for example the rabies vaccine: https://en.wikipedia.org/wiki/Rabies_vaccine