front load spins in some cycles only

The washer would not spin on a certain cycle but would on another but then ceased to spin on any cycle. Doesn’t seem to fit the door latch problem. Could it still be that or something else?
Thanks

Use the tech notes inside the bottom service panel to test the speed/motor control board. That is your likely problem.