If the process is nonstationary in the sense of each observation being drawn, in an entirely unrestricted fashion, from a different distribution, i.e., having a different mean, variance, marginal distribution,... then statistics indeed cannot perform its magic of teaching us something about these distributions (and we then haven't even talked about unrestricted dependence yet): we then only have one observation per distribution, and there is already no way of estimating a variance from a single observation, and also estimating a mean from a single data point is not recommended (let alone trying to estimate the dependence structure or distribution).
On the other hand, there are many processes that are nonstationary, but in a more "structured" fashion, for which we can learn a lot. Take, e.g., a random walk
$$
y_t=\phi y_{t-1}+u_t\quad \phi=1
$$
If we do not know $\phi$ (i.e., it could to us also be a stationary AR(1) process), a regression of $y_t$ on its first lag will estimate $\phi$, and that in fact unusually well indeed, see e.g. Estimation of unit-root AR(1) model with OLS