From Rav Yosef Fund, Senior Posek, Medical Halacha Center, a division of the Bais HaVaad
The poskim discuss vaccinations from a halachic perspective. In earlier times, when vaccines were less safe, we find the poskim expressing some hesitancy in sanctioning vaccinations, but most later seforim write that this earlier hesitancy is no longer relevant.
It should be noted that for the sake of simplicity, the following discussion will not distinguish between different vaccines. The efficacy and safety of different vaccines obviously vary, as does the severity of various diseases.
Rav Yishmael HaKohein of Modena, Italy (1743-1811), in his work, Shu”t Zera Emes (2:32) has a multi-letter exchange discussing whether “inoculazione” (inoculation) is halachically proper. It seems that the discussion relates to the widespread practice of that time to deliberately introduce pus from a smallpox sufferer into the skin of a healthy person, who would then develop a relatively mild case of pox