Shut off the water main valve.

Open all the faucets in the house, don’t forget ones in the tub and any in the basement.

Leave them on to drain for 5 min.

Shut off all the faucets

Turn on the water main valve again.

This procedure will refill the “water hammer arrestors” in your plumbing and stop the banging.

When you first turn on the faucets again, you will get a lot of air and spitting out of water, this will go away in a short time.

Good Luck!