Water Hammer
Water hammer is the noise/shockwave generated when water is suddenly stopped/cut off.
Over time it can damage your system doe to the shockwaves along the pipes.
Source
https://piperepair.co.uk/2020/07/06/water-hammer-what-it-is-and-how-you-can-stop-it/ (mirror)