When ice melts into liquid water, the density of the liquid increases. As we increase the temperatures, the molecules move faster and get further apart & thus the density decreases with an increase in temperature increases.
At 0°C temperature, the water still contains many ice-like clusters. These clusters are free to move relative to each other, so water is still liquid.
At 4 °C, the clusters start forming. The molecules are still slowing down and coming closer together, but the formation of clusters makes the molecules be further apart. Cluster formation is the bigger effect, so the density starts to decrease. Thus, the density of water is a maximum at 4 °C.
Water shows anomalous behavior when its temperature is increased from 0ºC to 4ºC then its density will increase & it shows expansion. At 4ºC it shows maximum density but as we further increased its temperature, its density decreases