My new washing machine is making a loud banging noise during the spin cycle
That sounds rough a loud banging during spin is not normal and should be checked soon.
I doubt it's something huge but stop the machine and redistribute the load to see if the noise changes.
In my experience a new washer with a loud noise often hides a loose drum support or bearing and a service call fixes it.
If it keeps up contact the retailer or manufacturer for a warranty repair rather than attempting a risky DIY fix.