Specifically, as temp increases, solids, gas and fluid expand. if you will recall from your school days,
https://www.bbc.co.uk/bitesize/guides/zq7t4j6/revision/2#:~:text=Liquids%20expand%20for%20the%20same,they%20expand%20more%20than%20solids.&text=Heat%20causes%20the%20molecules%20to,of%20a%20solid%20or%20liquid.

It is literally the atoms moving faster causing them to push away from each other causing the expansion.

Compress ability is why we use fluids in like the braking system.
It causes the pressure to build up faster than a system with gas in it.
IF you think about the expansion due to heat the same way, molecules have more room to push together in a gas vs a liquid or a solid.

That is why when you get volume measurements it is at 70 degrees F not at any temp.
you can then adjust for the temp that the item is at for actual volume.

https://hypertextbook.com/facts/2007/AllenMa.shtml

Water is also the only substance that I remember that expands when it freezes. An exception to the rule about getting smaller as the temp goes down.
which is why the block cracks if you only have water in it and it freezes.