How to Replace a Washing Machine Water Inlet Valve
The washing machine water inlet valve plays a vital role in filling the washer tub, as it controls the flow of both hot and cold water according to the machine's settings. A faulty valve can result in operational problems such as improper filling, leaks, or noisy performance. While minor issues may be resolved by cleaning the inlet ports, thorough testing can determine if a valve replacement is necessary. Swapping out a defective valve can be a sensible and cost-effective DIY task, provided you're comfortable using the right tools and following model-specific instructions.

How a Water Inlet Valve Works
The water inlet valve has two threaded ports connected to hot and cold water hoses at the back of the washing machine. Each port is controlled by a solenoid valve that sends electric power to open and close hot and cold water flow based on the wash temperature settings and signals from the water-level switch .
Fixing a water inlet valve can involve cleaning the filter screens, replacing damaged valve seals, repositioning the valve if misaligned, and replacing the entire value.
Before You Begin
Before you examine the water inlet valve, disconnect the washing machine from the power supply and the water supply. Turn off the washer and unplug it from the wall outlet.
Turn off the hot and cold water valves on the house side of the water supply hoses . Set a bucket on the floor to catch water from the supply hoses. Unscrew the washer ends of the supply hoses from the washer, using pliers to loosen the connections, if necessary. Direct the loose end of each hose into the bucket to drain water from the hose.
Source: https://www.thespruce.com/repair-washing-machine-water-inlet-valve-1824606