Banging in a Colony house is usually the plumbing rather than the tank: original runs, old framing, and pipe that expands against both.
The three causes here
A pipe run that taps. Hot pipe grows along a long original run and knocks against a joist or a strap. It often starts after another job moved something nearby.
Water hammer. A knock in the wall when a tap or an appliance shuts. It is the plumbing, not the heater, and the fix is an arrestor or re-clipping.
A tank moving against its straps. Less common, and it is the one the city's inspection checks.
What the visit does
The sound is located by ear and touch, the system pressure is measured, the expansion tank and relief valve are checked, and the strapping is confirmed. Where the tank has shifted, the strapping is corrected at the same visit.
The city and the access
Where a repair touches the tank, the city's permit applies with its fixture fee and final inspection. Alley access is common here, which decides how the visit is set up.