This is because the density of water( liquid is better for explaination) and solid is very high.
The pressure by the vibration of particle is extremely high.
So w are not able to compress them.
Whereas, the density of gas is low compared to solid or water.
We are then able to compress it as the pressure by its particle is quite low.