Here’s a really excellent video on fixing this issue:
https://www.youtube.com/watch?v=35gp5LQtAS4
Here’s a video on testing the water inlet valve:
https://www.repairclinic.com/Video/Video-Landing/635-11/Washer-Not-Filling-Water-Inlet-Valve-Testing-Troubleshooting
Here’s where to buy the part:
https://www.repairclinic.com/PartDetail/Water-Inlet-Valve/WPW10212596/1551647?modelNumber=YWFW9151YW00&fromRepairHelp=True