Diagnosis
That's hydraulic shock, often called 'water hammer'. It happens when you release the spray gun trigger suddenly. The moving water slams to a stop, sending a shockwave back through the pump and hose.
How to Fix It
You need to soften how you release the trigger. Don't just let it snap shut. Ease your finger off the trigger over half a second to let the water flow taper off gradually. This simple change in technique almost always eliminates the bang.
If That Didn't Work
If the knocking persists even with gentle trigger release, there might be air trapped in the pump or high-pressure hose. With the machine off and water supply connected, pull and hold the trigger for 30 seconds to purge air from the system. Then try again.
Heads Up
Consistent, violent knocking can stress pump components and fittings over time. It's a technique issue, not usually a broken part, so fix your trigger finger first.