Washer want spin

Washer will not spin during regular cycle. If I notice it, I can go
raise the lid and shut it and it will spin. Could it be just the switch?

That is almost certainly the problem.