Those badly hacked wires are for the brake light switch, nothing to do with the headlight. The PO has probably taken a 12V feed off the brake light feed for something else like a USB charger. You should remove the dangling wire so you don't get a short and take out the fuse.
The headlights (low and high) are powered through relays; these are magnetic switches, when the coil is powered it causes an internal switch in the relay to close and e.g. allows power to reach the low beams. There is a separate relay for the low beam and high beam, but they can be swapped around to test. To close the relay, 12v must be fed to one terminal of the coil, the other must terminate at the ground to compete the circuit.
For the headlight, power comes from the right pod along the blue/white line and that powers the low beam relay coil to close. The same blue/white wire feeds th high beam circuit as well so you know that is OK.
Both coils are powered from a red/black wire in and feeds out to the low beam bulbs on the white/black wire. I'd suggest you find the low beam relay, check that it is receiving 12v on both the red/black and the blue/white (when ignition is on) and that there is continuity to ground on the green, and that there is 12v on the white/black when 12v is applied to the blue/white. You could have a dead relay (can switch it with the high beam to test) or a bad ground.