LK is this tank in a basement?
I only ask because one time when I changed a water tank in a basement I closed an old stop and drain valve to isolate the water from draining back from upstairs. After the new tank was in I had the same issues.
Cutting out the old stop and drains and replacing them stopped the water hammer issue. I guess they have some kind of rubber washer in them that comes loose when disturbed after years of not being exercised.