Urinary tract infections (UTIs) and constipation are common issues that can occur together. UTIs cause inflammation in the bladder or urinary tract, leading to symptoms like burning with urination and blood or cloudy urine. Constipation—difficulty with passing stool (poop)—is primarily a symptom of certain digestive disorders or dietary issues. Though UTIs don't directly cause constipation, researchers have found many links between these conditions.
Source: Verywell Health