You're describing the DTFT (discrete-time Fourier transform), not the DFT.
https://en.wikipedia.org/wiki/Discrete-time_Fourier_transfor...
Pedantics aside: Spectrum analyzers are computing DFTs over a finite window, and it's perfectly reasonable to think of these as (an approximation of) power spectral density changing over time.
Right. But if you think Fourier transforms produce a function of ‘power spectral density over time’ you are on a road to misunderstanding. Or even if you think that it makes sense to talk about the Fourier transform ‘at a moment in time’.
The thing I am railing against here is the idea that you can just look at a spectrogram to grasp Fourier. You can’t. It is an advanced application of Fourier transforms that creates a visualization of power spectral density over time but it is not a (simple) Fourier transform of the underlying data.
A spectrogram remains a visualization of a short time Fourier transform at a number of points in time. In practice usually produced using a DFT because discrete samples are what you have to work with.