Most of the time the doctor doesn't know the exact pathogen you are infected with. He'll suspect a bacterian infection of some kind and prescribe a wide range antibiotic.
Doing what you suggest will require changing the way we do medicine. Which might not be a bad thing but requires some determination.
Bacteriophages fight bacteria. They actually do the fighting. They are quickly cleared by the body, so they are useless for prevention.
It should be promoted by governments.
phages are found in large quantities in mucus, where they seemingly contribute to the barrier function of mucus by preying on any bacteria that try go cross
https://pubmed.ncbi.nlm.nih.gov/23690590/
https://www.pnas.org/doi/10.1073/pnas.1508355112
https://journals.asm.org/doi/10.1128/mbio.01984-19
this might be adaptable for therapeutics