want to add a few things to this...
if you haven't been diagnosed with uti yet, just seeing symptoms, DON'T take azo until you get your urine tested if you can avoid it. (if you wear contact lenses, azo will stain those just like your urine so either stop using them while you're on it or avoid azo!) azo can mess with urinalysis results and hide your symptoms, letting the infection progress without you knowing. once you get a diagnosis and are assumedly put on an antibiotic, azo as much as you need. water is still a great idea and if cranberry juice doesn't give you bladder pain, that's a good idea too.
if you have recurring utis, i take d-mannose (very important), a cranberry/herb supplement, a probiotic, and oral aloe vera caps for mine and my related interstitial cystitis. ever since i've started them i haven't had any problem with symptoms.
if you get any pain and/or uti symptoms from cranberry juice, vinegar, tomatoes, lemons, or alcohol, you may want to reduce your acids. i find that i do just fine with alcohol as long as i drink a lot of water with it and have a good meal too. when i'm going to eat something acidic that i know gives me those symptoms, i take an azo bladder pain relief for that too.
my uro also recommended vaginal estradiol (if you have one) - might seem counterintuitive for transmascs but it stays local (doesnt go full system like oral estradiol) and it does help prevent further utis. might not be relevant if you haven't had a hysterectomy or aren't on testosterone, and it needs a prescription (and can be expensive 💀), but in the case of recurring utis it can be super helpful and is surely a lot cheaper than frequent urgent care visits. good luck and hope you feel better soon!