Forecasting the ionosphere layer's total electronic content (TEC) is crucial for its impact on satellite signals and global positioning systems (GPS) and the ability to predict earthquakes. The existing statistical-based forecasting models such as ARMA, ARIMA, and HW suffered from the TEC nonstationarity nature, which requires algorithmic handling of the forecasting and the mathematical part. This study proposes a hybrid method that incorporates several components and is designated as Optimized Variational Mode Decomposition with Recursive Neural Network Forecasting (OVMD-RNN) to forecast TEC. Before using the Elman Network to train each component, Variational Mode Decomposition (VMD) was used to decompose the signal into its essential stationary components. In addition, the proposed method includes an optimization algorithm for determining the best VMD decomposer parameters. The GPS Ionospheric Scintillation and TEC Monitor (GISTM) at Universiti Kebangsaan Malaysia station have been used to evaluate the method based on collected datasets for three years, 2011, 2012, and 2013. The experiment findings show that the model has successfully tracked all the up and down patterns in the time series. The results also reveal that VMD-based training might not always provide good results due to the residual signal. Finally, the evaluation focused on generating loss value and comparing it to the ARIMA benchmark. It showed that OVMD-RNN had accomplished a maximum improvement percentage of ARIMA with a value of (99%).