Those valves are likely latching solenoid valves, and if so they would requires an H-bridge to control. The easiest way to tell is to measure the resistance between the two wires of the valve. Generally if the resistance is above 20 to 30 ohm, they are standard DC valves, and can be operated using a relay board connected to free GPIOs. However, if the resistance is very low, below 10 ohm, it’s a latching solenoid valve and you will need H-bridge to control it.