Water freezing into ice EXPANDS. ($\ce{H2O}$ is most dense at $\pu{4^\circ C = 39^\circ F}$) - https://sciencestruck.com/density-of-water. In other words, water expands BOTH as it cools below $\pu{4^\circ C}$, AND as it warms above $\pu{4^\circ C}$.
When ice comes out of the freezer, it is typically well below $\pu{0^\circ C}$. It may be at $\pu{-10^\circ C}$ for example. When you pour a (warmer) liquid over the ice, the SOLID ice CONTRACTS as it warms up from $\pu{-10^\circ C}$ towards $\pu{0^\circ C}$.
Note that this is the SOLID ICE which is contracting as it warms - this is all BEFORE it gets UP to $\pu{0^\circ C}$ (at which point it will melt into a liquid). Since ice is a brittle solid crystal lattice, it cracks as it contracts.
(You can see the expansion of $\ce{H2O}$ as it freezes - notice in an ice tray, or a hose, it expands as it freezes. If you freeze water in a glass, it will break the glass.)
For more info + details see https://en.wikipedia.org/wiki/Ice#Physical_properties and https://www.engineeringtoolbox.com/ice-thermal-properties-d_576.html