Assessing the adverse impacts of trihalomethanes, the most hazardous disinfection by-products, is crucial for community health protection. This study evaluated physicochemical parameters, trihalomethane levels, their prediction, and risk assessment using probability and Sobol analysis. Results indicated that electrical conductivity, total dissolved solids, nitrate, sulfate, calcium, lithium, total organic carbon, and ammonium exceeded permissible limits. Tribromomethane (0.14–3.21 μg/L in winter; 0.06–0.17 μg/L in summer), trichloromethane (1.90–3.53 μg/L in winter; 3.19–5.44 μg/L in summer), bromodichloromethane (0.62–4.24 μg/L in winter; 3.27–6.41 μg/L in summer), and dibromochloromethane (0.82–2.41 μg/L in winter; 0.69–3.03 μg/L in summer) remained within safe limits. Random Forest analysis identified total organic carbon as the most significant factorin trihalomethane production, with a positive correlation between trihalomethanes and bromide. Per the World Health Organization’s risk assessment, trihalomethane concentrations posed no harm to residents (IWHO<1). However, the United States Environmental Protection Agency’s assessment indicated an acceptable low cancer risk (100% cumulative cancer risk for all groups). Additionally, nitrate and fluoride levels surpassed the standard limit, with hazard index above 1 in both seasons for residents. Monte Carlo simulations showed that the 95th percentile of residents faced non-carcinogenic (nitrate and fluoride). However, 100% of children and 99.98% of adults were exposed to an acceptable low carcinogenic risk for THMs. Factors like inhalation rate, body weight, and trihalomethane levels significantly impacted health risk. These findings highlight the necessity for continuous monitoring and effective water treatment to safeguard public health, promote clean water, and advance sustainable development, advocating for sustainable water management to tackle health risks from environmental pollutants like disinfection by-products.