This current study addresses the knowledge gap regarding the influence of seasons, months, and THI on milk yield, composition, somatic cell counts (SCC), and total bacterial counts (TBC) of dairy farms in northeastern regions of Iran. For this purpose, ten dairy herds were randomly chosen, and daily milk production records were obtained. Milk samples were systematically collected from individual herds upon delivery to the dairy processing facility for subsequent analysis, including fat, protein, solids-not-fat (SNF), pH, SCC, and TBC. The effects of seasons, months, and THI on milk yield, composition, SCC, and TBC were assessed using an analysis of variance. To account for these effects, a mixed-effects model was utilized with a restricted maximum likelihood approach, treating month and THI as fixed factors. Our investigation revealed noteworthy correlations between key milk parameters and seasonal, monthly, and THI variations. Winter showed the highest milk yield, fat, protein, SNF, and pH (p < 0.01), whereas both SCC and TBC reached their lowest values in winter (p < 0.01). The highest values for milk yield, fat, and pH were recorded in January (p < 0.01), while the highest protein and SNF levels were observed in March (p < 0.01). December marked the lowest SCC and TBC values (p < 0.01). Across the THI spectrum, spanning from -3.6 to 37.7, distinct trends were evident. Quadratic regression models accounted for 34.59%, 21.33%, 4.78%, 20.22%, 1.34%, 15.42%, and 13.16% of the variance in milk yield, fat, protein, SNF, pH, SCC, and TBC, respectively. In conclusion, our findings underscore the significant impact of THI on milk production, composition, SCC, and TBC, offering valuable insights for dairy management strategies. In the face of persistent challenges posed by climate change, these results provide crucial guidance for enhancing production efficiency and upholding milk quality standards.