likely cause is the water valve. What happens is the water valve
will stop letting cold water into the washer; therefore, once the washer gets to rinse it will either stop or not do anything during the whole rinse cycle.
This is because when you selected your water temperature, you may have selected warm/cold or hot/cold. The hot water came in and you didn't notice any problems. When it got to rinse, the cold water the cold water won't come in. Therefore, the washer does nothing.
The item to check would be your water inlet valve. Check it for continuity with a multi meter it should show Ohms or a closed circuit. To test it when water is overflowing unplug the unit and see if it still overflows or continues to fill. If it stops when unplugged. Then it is not a water inlet problem but an electrical signal problem going to ur water inlet valve. Possibly from the panel or board. You can also do a live volt test to see if it is getting the full 120 current, but be sure to unplug unit before testing as this is a live test.
Another test u can do to check the water inlet valve,
first cut the water off and remove the hoses off the back of the washer. Then one at a time point the hoses inside the washer tub and turn the water back on. If you don't have good water pressure, turn the water back off and remove the strainer that should be in one end of the hose. Inspect the strainer to see if it is stopped up, clean it and reinstall it. Now repeat this test. If you have good water pressure now, reinstall hose and your problem is fixed.
If you still don't have good water pressure, the problem is in your house plumbing and you need to call a plumber. If you had good water pressure the first time you performed the test, the water valve is bad and needs replacing.
If your washer doesn't go through the washer rinse cycle the timer may be the problem. Sometimes the timer gets stuck in the middle of the cycle or won't turn at all. If the washer runs, but the timer doesn't turn, the timer is bad and needs replacing.
Do you have anti-flood hoses leading to the machine. If you do there is probably a loose tube in the back causing a small leak. When the hoses detect that water is still flowing after a certain amount of time due to the leak it shuts down and causes the machine to turn off during the rinse/spin cycle