We propose a machine-learning approach to construct reduced-order models (ROMs) to predict the long-term out-of-sample dynamics of brain activity (and in general, high-dimensional time series), focusing mainly on task-dependent high-dimensional fMRI time series. Our approach is a three stage one. First, we exploit manifold learning and, in particular, diffusion maps (DMs) to discover a set of variables that parametrize the latent space on which the emergent high-dimensional fMRI time series evolve. Then, we construct ROMs on the embedded manifold via two techniques: Feedforward Neural Networks (FNNs) and the Koopman operator. Finally, for predicting the out-of-sample long-term dynamics of brain activity in the ambient fMRI space, we solve the pre-image problem, i.e., the construction of a map from the low-dimensional manifold to the original high-dimensional (ambient) space by coupling DMs with Geometric Harmonics (GH) when using FNNs and the Koopman modes per se. For our illustrations, we have assessed the performance of the two proposed schemes using two benchmark fMRI time series: (i) a simplistic five-dimensional model of stochastic discrete-time equations used just for a "transparent" illustration of the approach, thus knowing a priori what one expects to get, and (ii) a real fMRI dataset with recordings during a visuomotor task. We show that the proposed Koopman operator approach provides, for any practical purposes, equivalent results to the FNN-GH approach, thus bypassing the need to train a non-linear map and to use GH to extrapolate predictions in the ambient space; one can use instead the low-frequency truncation of the DMs function space of L2-integrable functions to predict the entire list of coordinate functions in the ambient space and to solve the pre-image problem.