Shaykh Ibn ‘Uthaymeen said:
And from among them is that there is nothing wrong with a person using medicines, pills and vaccinations that prevent the epidemic, because that is from [seeking] protection before the outbreak of the affliction, and there is nothing wrong with it.
Just as if a person is afflicted with an infectious disease, and treats it, then there is nothing wrong in him [having done that]. So likewise, if he takes precaution against it, there is no harm in him [having done so], and this is not considered to be a lack of trust [in Allaah]. Rather, it is from trust, because taking protective action from death and suffering is necessary, and the one who trusts [in Allaah] or claims he is trusting [of Allaah] and does not take protective action, then in reality he is not trusting [of Allaah], rather he is contesting the wisdom of Allaah (‘Azza wa Jall), because the wisdom of Allaah refuses to be anything other than the reason which Allaah (Ta’aala) decreed for him. And Allaah is the Expounder of [All] success.