Global warming, a significant outcome of climate change, exerts detrimental effects on the daily lives of individuals and industries. As a result, there is an increased demand for Electric Vehicles (EVs) to reduce carbon emissions contributing to climate change. This shift underscores the critical need for accurate estimation of the State of Charge (SoC) in battery systems, which is essential for optimizing EVs' performance and ensuring effective energy utilization. This paper introduces a methodically constructed and tested SoC prediction model utilizing a comprehensive dataset derived from various driving cycles and battery records. The battery performance of EVs was assessed in our study. The essence of our innovation resides in the meticulous choice of representative driving cycles, effectively replicating real-world conditions. This methodology improves the model's capacity to apply to various driving patterns and conditions. During these cycles, a comprehensive set of battery data, encompassing voltage, current, temperature, and SoC, was systematically documented to facilitate thorough analysis. To achieve superior accuracy and robustness, our predictive model considers the strengths of the Extra Tree Regressor (ETR) and Light Gradient Boosting algorithms. Our experimental results demonstrate the remarkable performance of the ETR model in predicting SoC, surpassing the LightGBM model. The ETR model exhibited higher R-2 values of 0.9983 and lower Root Mean Square Error (RMSE) of 0.62, Mean Absolute Error (MAE) of 0.085, and Mean Squared Error (MSE) of 0.39 values, underscoring its superiority. The research emphasizes the considerable significance of battery capacity in effectively predicting the SoC of EVs. Our research highlights the significant importance of battery capacity in accurately forecasting the SoC of EVs. The proposed model facilitates accurate SoC predictions, improving energy management in EVs to optimize battery utilization and support informed decisions toward sustainable mobility.