The first thing to check for is a blockage in your inlet valve. They have little filter screens that tend to get clogged. Then check out the hose from the tub to the water level switch and make sure it is not blocked. You do these first not because they are the most likely problem, but because it does not cost anything.
If they are ok, use a meter to see if the valve assembly is getting power when it is supposed to be filling. If so, replace the valve assembly. If not, try replacing the water level switch.