How do I filter audio with modified spectrogram? Say I computed Spectrogram of some audio input using scipy.signal.spectrogram.

Is there an easy way in python to use it as a filter for my audio input to produce an other audio which would basically be just silence or very near to that?

In practice I would modify that spectrogram before applying it back to the audio to filter out only some audio information.
Modify the spectrogram and then use scipy.signal.istft

scipy.signal.istft(Zxx, fs=1.0, window='hann', nperseg=None, noverlap=None, nfft=None, input_onesided=True, boundary=True, time_axis=-1, freq_axis=-2)
Perform the inverse Short Time Fourier transform (iSTFT).