The study try to evaluate the susceptibility of groundwater. The DRASTIC model was implemented through GIS. Various input variables, such as water table depth, net recharge, aquifer and soil media, topography, vadose zone impact, and hydraulic conductivity, were evaluated within the model to generate a groundwater vulnerability map. Subsequently, machine-learning algorithms (SVM, RF, and GLM) employed using the SDM package in R software to optimize the DRASTIC method. To assess the performance of groundwater pollution risk models, training and validation datasets were evaluated using the ROC curve. The results revealed that approximately 40% of the study area fell within the high vulnerability range, while around 30% exhibited moderate pollution risk. Evaluation of the machine learning models indicated their effectiveness in model development. The RF model demonstrated the highest predictive power, achieving an AUC of 0.98. Additionally, the GLM and SVM algorithms achieved AUC values of approximately 76%. These algorithms can serve as efficient techniques for evaluating and managing groundwater resources. The findings underscored relatively poor groundwater quality in the study area, with excessive aquifer exploitation by the agricultural sector and infiltration of urban sewage and industrial waste identified as the primary causes of groundwater pollution. The implications of these findings are crucial for devising strategies and implementing preventive measures to mitigate water resource vulnerability and associated health risks in central Iran.