Won't fill and goes into spin

As soon as I turn on in any cycle it wont fill and go into spin mode. I replaced the pressure switch and the water valve. What is the problem? Thanks

You are probably having a timer issue.

Your machine (while branded Maytag) is based on and built by whirlpool.
This direct drive machine has an analog (points and contacts) style timer.
If the machine starts to spin when the timer is in any position then its time for a timer,
here is the part you need
Whirlpool WPW10243947 Timer - AppliancePartsPros.com