Predicting groundwater levels (GWLs) is crucial for both resource management and ecological preservation. It aids in the creation of policies for artificial groundwater recharge, adjusts the quantity of extraction wells, and so on. It can also promote sustainable human development and provide information for decisions about water resource management. However, the complexity of the relationship between surface water and groundwater, anthropogenic impacts, and climate change make it harder to anticipate groundwater levels. This study proposes a comparative analysis of multi-step ahead monthly GWL prediction based on the artificial neural network with Backpropagation (ANN-BP) and SVM optimized with particle swarm optimisation (PSO) and sail-fish optimisation algorithm (SOA). The study included meteorological data, as well as variations in GWL and increases and declines, from one GWL monitoring site between 2002 and 2023. Additionally, the model was trained using the first 70% and tested using the remaining 30% of the time-series data. Each model was assessed both qualitatively and quantitatively using time-series line graphs, scatter plots, box plots, and histogram plots, as well as the mean square error (MSE), coefficient of determination (R2), Nash-Sutcliffe efficiency (NSE), and Willmott Index (WI). The SVM-SOA model performed better than the other models at the chosen groundwater monitoring station in terms of MSE, R2, NSE and WI during the training and testing phases, according to a comparison of the models.