Accurate instantaneous electricity peak load prediction is crucial for efficient capacity planning and cost-effective electricity network establishment. This paper aims to enhance the accuracy of instantaneous peak load forecasting by employing models incorporating various optimization and machine learning (ML) methods. This study examines the impact of independent inputs on peak load estimation through various combinations and subsets using multilinear regression (MLR) equations. This research utilizes input data from 1980 to 2020, including import and export data, population, and gross domestic product (GDP), to forecast the instantaneous electricity peak load as the output value. The effectiveness of these techniques is evaluated based on error metrics, including mean absolute error (MAE), mean square error (MSE), mean absolute percentage error (MAPE), root mean square error (RMSE), and R2. The comparison extends to popular optimization methods, such as particle swarm optimization (PSO), and the newest method in the field, including dandelion optimizer (DO) and gold rush optimizer (GRO). This comparison is made against conventional machine learning methods, such as support vector regression (SVR) and artificial neural network (ANN), in terms of their prediction accuracy. The findings indicate that the ANN and GRO approaches produce the least statistical errors. Furthermore, the correlation matrix indicates a robust positive linear correlation between GDP and instantaneous peak load. The proposed model demonstrates strong predictive capabilities for estimating peak load, with ANN and GRO performing exceptionally well compared to other methods.