It all boils down to the question whether the Fourier transform of the signal exists or not. If you model a signal as a stochastic process then you can't take its Fourier transform because normally it doesn't exist. But if you consider a real-world signal (which usually has finite length) then the Fourier transform (usually) exists and the two operations (autocorrelation + Fourier transform, Fourier transform + magnitude squared) are identical. In that case the (deterministic) autocorrelation is
$$R_x(\tau)=\int_{-\infty}^{\infty}x(t)x(t-\tau)dt=x(t)*x(-t)$$
where \$*\$ denotes convolution. Noting that the Fourier transform of \$x(-t)\$ is \$X(-\omega)=X^*(\omega)\$ (because \$x(t)\$ is real-valued), you get for the Fourier transform of the autocorrelation
$$\mathcal{F}\{R_x(\tau)\}=X(\omega)X^*(\omega)=|X(\omega)|^2$$
So either computing the autocorrelation and taking its Fourier transform or computing the signal's Fourier transform and taking the squared magnitude give the same result. Note that this is true whenever the Fourier transform of the signal exists.