Dear Student,
We know that, the space between the particles of the gas is large, when we apply pressure, the particles of the gas come closer to each other because the space between particles decreases, as the particles come close to each other, the interaction between them increases, leading to development of attractive forces as a result, the gas converts into liquid.
Regards