Electric vehicles (EVs) are essential to reaching the UN Sustainable Development Goals for 2030 because they reduce emissions and improve air quality. They also play a pivotal role in decarbonizing the transport sector, which accounts for nearly one-quarter of global CO2 emissions. In order to encourage the shift to sustainable transportation, Electric Vehicle Charging Stations, or EVCSs, must be placed strategically across cities. However, problems, including increasing power losses, deteriorating voltage profiles, and voltage instability, have arisen in microgrids. These technical challenges become more severe with the growing penetration of renewable energy resources and variable EV charging demands. Thus, to overcome these obstacles, the model clustered the intricate, spatiotemporal charging patterns of EVs and proposed a novel Gaussian Mixture Model (GMM) to optimize the distribution of EVs and Distributed Generation (DG) at the same time due to the stochastic behaviors of renewable energy sources and EV uncertainties. Furthermore, it may facilitate enhanced grid stability and resource efficiency. The goal of this energy storage system allocation model is to maximize voltage stability, minimize power losses, and have the benefit of improving voltage profiles by solving an optimization issue with multiple objectives. This multi-objective optimization is handled using advanced algorithms that consider both technical constraints and economic efficiency. To investigate the proposed approach, the IEEE 33-bus test system is examined. Simulation results show that the proposed model outperforms existing analytical techniques by 1.45% in accuracy and has a suitable execution time.