@Bruce Rogers The drain hose and fill hoses behind the machine will move back n forth against the washer.
Open the door and see if there basket moves up and down a little. If the baskets wiggles or feels loose, the center rear bearing could be worn. Or the spider gear that secures the baske to drive shaft could be crack. Either will make a knocking noise during spin.
It could be the wire harness to the door lock. You can remove the three 1/4” screws that secure the top. Located at the rear of washer top. Once remove push the Ld back and up to remove. With it off you can watch what’s going on inside while it’s running. DO NOT TOUCH ANYTHING UNDER THE LID WHILE ITS PLUGGED IN.