Solid and liquids are much more denser than gas because their molecules are close to each other and with that the molecules of them can't move that freely unlike the gas molecules. Also, because of being near to each other the molecules of solid and liquids became heavy making them dense.