In most cases, Its simply the lid switch that has gone bad.
Put your washer on Spin cycle and look for the little plastic peice on your lid that goes into a small opening, if you have this then verify its working by pushing a small screwdriver in the hole, pressing it down.
The washer needs to verify that the lid is closed before it will go into spin mode (Safety for peoplesw hands etc).
If you dont see this then you may have a magnic type switch or one built into the lid itself.
Most local appliance parts stores have this part with a model and make of the washer.
Good Luck! I’m happy to help further over the phone at
https://www.6ya.com/expert/michael_341f3f9dee622e54