The Fourier Transform only looks at the frequency response of a signal as a whole. It doesn’t account for frequencies that come and go over time. This is where the Short-Time Fourier Transform comes in useful. The STFT is used to build Spectrograms.
For a comprehensive and visually intuitive exploration of the Fourier Transform and its workings, I invite you to explore my book series on the Fourier Transform available at:
#SignalsAndSystems
#STFT
#FFT
#FourierTransform