A couple of possibilities here, none of them difficult or expensive to fix.
1. Take off the cold water hose and stick it in the machine or sink and turn on the valve, see if water is coming out. If not the problem is in your water line.
2. Check the inlet screen inside the cold water valve, it is easy to get clogged.
3. Take off the cabinet check to make sure 120v is coming to the valve when it is supposed to be on (cold water wash fill or rinse fill).
4. If all checks out, replace the valve assembly, this part here
Part number: AP3094541
This video will show you how to remove the cabinet to get to the valve.
YouTube - Direct Drive Washing Machine Repair Video Tutorial *Watch in HIGH Quality!*