Depending on type, there will be some form of springs, etc. to hold the barrel centered while spinning but also let it move a bit. If it was fixed solid, the whole washer would tend to move and slide as the off centered weight is thrown about.
So some looking at what holds the barrel and what works to hold it centered may show up what is now worn and not holding it well enough.
The banging is likely the barrelhitting the sides!
So do you see some spring arms with rubber "feet" setting down on the barrel edges ?
That is a common one and fails if the spring arms lose their tension or the rubber feet no longer grip. New springs, new feet or maybe as simple as clean the grime off the barrel so the rubber gets a better grip? Detergent between the feet and barrel is really slick!
Getting the load centered is good but pretty tough to do!