Was it momentary, or constant after this happened? Did it just bang once, or does it continue?
In the shower, a sudden drop in cold water pressure can cause the pressure balance spool valve to slow total water flow, and if it stuck in that position, it could continue. WHen working properly, it would move back on its own and in the process try to make the outlet temperature stay fairly constant, but that won't happen if it sticks.
Are all of the other faucets' hot flow 'normal'?
Most modern shower valves no longer have a simple valve seat and washer, but if it's an old one, that can be the source of the problem. WIth one of those, at the 'right' flow rate, it can sound like a jackhammer as the washer slows/stops the flow, then releases, and repeats at sometimes a high rate.