As industrial development and population growth continue, water pollution has become increasingly severe, particularly in rapidly industrializing regions like the area surrounding the Yopurga landfill. Ensuring water resource safety and environmental protection necessitates effective water quality monitoring and assessment. This paper explores the application of advanced machine learning technologies and the Water Quality Index (WQI) model as a comprehensive method for accurately assessing groundwater quality near the Yopurga landfill. The methodology involves selecting water quality indicators based on available data and the hydrochemical characteristics of the study area, comparing the performance of Decision Trees, Random Forest, and Xgboost algorithms in predicting water quality, and identifying the optimal algorithm to determine indicator weights. Indicators are scored using appropriate sub-index (SI) functions, and six different aggregation functions are compared to find the most suitable one. The study reveals that the Xgboost model surpasses Decision Trees and Random Forest models in water quality prediction. The top three indicator weights identified are pH, Manganese (Mn), and Nickel (Ni). The SWM model, with a 0% overestimation eclipsing rate and a 34% underestimation eclipsing rate, is chosen as the most appropriate WQI model for evaluating groundwater quality at the Yopurga landfill. According to the WQI results from the SWM aggregation function, the overall water quality in the area ranges from moderately polluted to slightly polluted. These assessment results provide a scientific basis for regional water environment protection.