https://www.sfaf.org/collections/beta/we-asked-clinicians-would-you-prescribe-doxycycline-to-someone-for-sti-prevention/ It cites a study that shows a reduction in STIs of 70% if you take doxycycline every day.
But it isn't 100%. Which means that 30% of STIs are already doxycycline-resistant. This proportion will increase.
And taking daily antibiotics as a preventive will cause problems, perhaps for you personally, that go well beyond breeding resistant STIs. There are serious diseases like Clostridioides Difficile that can kill you, that can be caused by taking antibiotics.
When you wipe out your normal gut bacteria, which happens every time you take antibiotics, it leaves your gut open for colonization by antibiotic-resistant bacteria, including this dangerous Clostridioides Difficile.
About 30,000 people in the US die from Clostridioides Difficile each year. It has around a 6-7% fatality rate.
Tod had one of these Clostridioides Difficile infections a few years ago, resulting from taking antibiotics to treat a different infection. At the time, I realized that he had a non-trivial chance of dying from it. Luckily, he pulled through.
Taking antibiotics daily to prevent STIs is stupid and dangerous. But there's always a fraction of gay men who want to have limitless anonymous sex without condoms, and apparently there are doctors who are happy to market their medical practices to these guys by promising that pills can take the place of condoms.