Some of the possible parts to replace if a washer does not spin include the direct drive motor coupling, door lock, wax motor or lid switch. Other possibilities include the clutch assembly or drive belt.
A common symptom of a direct drive motor coupling problem is when the washer fills and drains, but does not agitate the clothing. A door that does not close or open easily could indicate a door lock issue. In a front loading washing machine, a door that doesn't close may need a new wax motor, which can be tested with a multimeter. A lid switch may fail in a top loading washer if it is not getting power or is not mechanically activated.