I used to get reoccurring UTIs about every 4-6 weeks and whilst I never found anything that would keep them at bay I did always keep cystitis relief sachets (sodium citrate) on hand to take the moment I could feel one coming on. They would always give me really quick relief from symptoms and if you keep taking them for a few days and drink lots of water the infection should clear on its own, this is what I found anyway. Medications whilst pregnant can be tricky as they obviously can't test to see if anything has an effect on a fetus for ethical reasons but from what I've been able to find it is fine to take during pregnancy if needed, it may just increase water retention which can be increased during pregnancy already
I haven’t experienced UTI when pregnant but I’ve done alot of research regarding UTI’s and there’s a couple things you can do long term as habit, to avoid them. I haven’t had one since a young adult that’s more than a decade ago -wear condoms for sex, or don’t let him cum inside ever unless TTC. Semen offsets vagina PH -wear cotton or bamboo undies during the day, commando at night and at home, let her breathe -avoid tight pants like leggings or yoga pants. Take them off as soon as you are finished working out. Lounge around in nightie or loose trackies, nothing up against the vagina -probiotics. Yogurt daily, yakult, kimchi -cranberry juice. Or tablet form cranberries Oh and no soap down there. The bubbles of the shampoo running down the body is plenty to clean it w water. Dont clean inside and don’t douche
I personally don’t think it’s worth the risk of taking the D-Mannose as there aren’t sufficient studies to confirm that it’s safe. Whilst UTIs in pregnancy aren’t ideal either, as long as they’re treated in a timely fashion, they don’t pose a risk. I don’t have experience with that exact medication, but I took a cranberry supplement before pregnancy to prevent UTIs and then stopped when pregnant as it was the same sort of situation. I did end up having several courses of antibiotics for UTIs in pregnancy and this did no harm to me or my baby. Keeping hydrated and wearing loose cotton underwear can help with prevention but I’m sure you know that already!