Intermolecular interaction Van Der Waals
Intermolecular attraction can reduce the volume, in the same way that increasing the pressure can lower the volume (Boyle's law).
One way to see the effect is to take the derivative of the volume, as given by the van der Waals (vdW) equation, with respect to the attractive parameter $a.$
The vdW equation is
$$\left(p+\frac{a}{\bar{V}^2}\right)(\bar{V}-b)=RT\tag{1}$$
Ignore for simplicity the excluded volume term $b,$ so that
$$p\bar{V}=RT-\frac{a}{\bar{V}}\tag{2}$$
Then the derivative of the volume wrt $a$ is
$$\left(\frac{\partial V}{\partial a} \right)_{p,T} = \frac{\bar{V}}{a-p\bar{V}^2}=-(RT)^{-1}\tag{3}$$
In essence what this result says is that the volume decreases as you increase the parameter $a.$