The volume of an object does NOT have to be the sum of the volumes of its parts!
There are four main states of matter that molecules can change through-while maintaining the same mass (gas, liquid, solid, plasma).
Freezing and melting have no impact on the
mass-they simply change a substance’s state
of matter.
When dissolving a substance it is very complicated to separate its molecules from the other solution molecules, but the mass of those molecules is still there.