Washer fills and agitates, won't drain/spin/rinse.

My washer will fill and agitate but will not enter the next cycle to drain and spin and rinse. If you move the timer to drain it starts to agitate again with no drain/spin/rinse.

If you open the lid the washer stops the agitation and starts again when you close the lid.

The timer is moving and goes to Off but it is still full of soapy water.

This has happened in the past but upon resetting the timer to the wash or rinse cycle again it would complete the cycle.

Now all that happens is the initial fill and agitate and the movement of the dial through the cycle with no drain/spin/refill.

What’s up?

I see the threads referencing a bad lid switch as the possible problem. But it agitates and stops when the lid is opened/starts when the lid is closed.

So will it work in this way with a bad switch?

Thanks