My new washing machine is making a loud banging noise during the spin cycle
That sounds rough a loud banging during spin on a new washer is not normal and should be checked soon.
Could be a simple unbalanced load or something stuck in the drum like a loose fastener so stop and redistribute the laundry.
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 DIY fix.