The precise prediction of power demand is of utmost importance for optimizing power system operations, particularly in the domain of the increasing integration of renewable energy resources. Conventional statistical and machine learning techniques encounter difficulties in capturing complex temporal correlations within load data. The objective of this research is to examine the utilization of Long Short-Term Memory – Recurrent Neural Networks (LSTM-RNNs) in load prediction and perform an extensive comparison analysis with the well-established XG-Boost and other conventional techniques. The incorporation of demand response and distributed renewable energy sources is of paramount importance in ensuring the stability of smart grids and the accurate assessment of power demand. However, the task of making precise energy forecasts faces various obstacles that stem from climate conditions, societal influences, and seasonal variations. The precision of our LSTM-RNN model is evaluated using actual demand data obtained from a prominent utility company in Germany. The findings indicate that the LSTM-RNN model consistently exhibits superior performance compared to standard machine learning techniques and XG-Boost in both short-term (1–24 h) and long-term (yearly) load forecasting. The LSTM-RNN has a notable level of resilience in generating accurate predictions, particularly when confronted with inadequate or noisy input data. The aforementioned results highlight the potential of LSTM-RNN in enhancing load forecasting in smart grids, hence enabling the efficient incorporation of demand response mechanisms and renewable energy sources. This study offers valuable insights and presents a comprehensive methodology for improving power demand estimation in contemporary power systems.