Check the connector behind the headlight whose low beam goes out. Check the wiring where it attaches to that connector. If it looks good, swap the left and right headlights. If the problem follows the headlight that's the problem. If it stays on the same side it's a wiring problem. It's not a headlight switch problem.