Intermolecular van der Waals interactions are central to chemical and physical phenomena ranging from biomolecule binding to soft-matter phase transitions. In this work, we demonstrate that strong light-matter coupling can be used to control the thermodynamic properties of many-molecule systems. Our analyses reveal orientation dependent single molecule energies and interaction energies for van der Waals molecules. For example, we find intermolecular interactions that depend on the distance between the molecules R as R-3 and R0. Moreover, we employ ab initio cavity quantum electrodynamics calculations to develop machine-learning-based interaction potentials for molecules inside optical cavities. By simulating systems ranging from 12 H2 to 144 H2 molecules, we observe varying degrees of orientational order because of cavity-modified interactions, and we explain how quantum nuclear effects, light-matter coupling strengths, number of cavity modes, molecular anisotropies, and system size all impact the extent of orientational order.