Causes
The usual causes, most likely first
Unbalanced load
Modern washers check balance before high-speed spin. If the load is lopsided, they try to rebalance, then give up.
How to spot it: Spin starts, slows, and starts again; unbalance code on the display.
The fix: Spread the load; wash bulky items alone on the bulky cycle; add similar items to a single heavy one.
Not draining
A clogged pump filter, kinked hose or failing drain pump leaves water in the tub, and the washer will not spin.
How to spot it: Water in the drum at the end of the cycle; drain codes.
The fix: Clean the pump filter; straighten the hose; replace the pump if it hums without moving water.
Lid lock or door lock
The washer will not spin unless it sees the lid or door locked.
How to spot it: Lock or door codes; clicking without locking.
The fix: Clear anything blocking the latch; replace the lock assembly if it has failed.
Drive belt, motor coupling or shifter
On many top-loaders a belt, coupler or shifter transfers motor power to the basket. When it wears, the motor runs but the basket does not turn.
How to spot it: Motor hum but no basket movement; burning rubber smell.
The fix: Replace the worn part.
Suspension and shocks
Worn shocks or springs let the tub bang during spin, and the washer slows down or stops to protect itself.
How to spot it: Loud banging, the tub sits low or off-center.
The fix: Replace shocks or suspension rods.
Motor, speed sensor or control
If the control does not see the motor reach speed, it stops.
How to spot it: Motor or speed codes; no spin even when empty.
The fix: Diagnose the motor, sensor, wiring and control with meters.