Why do we use window in time domain rather than do FFT modify the spectrum and than inverse FFT
Windowing is used because the DFT calculations operate on the infinite periodic extension of the input signal. Since many actual signals are either not periodic at all, or are sampled over an interval different from their actual period, this can produce false frequency components at the artificial 'edge' between repeated intervals, called leakage. By first multiplying the time-domain signal by a windowing function which goes to zero at both ends, you create a smooth transition between repeated intervals in the infinite periodic extension, thus mitigating the creation of these artificial frequency components when we then take the DFT.

This paper gives a more in depth look at this phenomenon, as well as some insight into the effects of different windowing functions.