The matter has already been decided by the Supreme Court.
The 1905 Supreme Court decision in the case
Jacobson v. Massachusetts. The court ruled against a man who had refused to be vaccinated against smallpox,
stating: "Real liberty for all could not exist under the operation of a principle which recognizes the right of each individual person to use his own (liberty), whether in respect of his person or his property, regardless of the injury that may be done to others." The Supreme Court explicitly upheld vaccine mandates against deadly diseases in
Jacobson, where it explained: "the rights of the individual in respect of his liberty may at times, under the pressure of great dangers, be subjected to such restraint, to be enforced by reasonable regulations, as the safety of the general public may demand."