My headlight goes on & off on 2001 Infiniti QX4

My vehicle headlights goes on & off after start. This happens to the left side (driver side lamp). When I turn the engine on, the headlight goes on and after a short while, flickers and then turns off. If am lucky sometimes, it might come on again whilst driving.
Interestingly, the issue started with the right headlight a while ago but for some reason, its working again but now the effect is on the left headlight.

Asked by for the 2001 Infiniti QX4
These has lots of problems with the head light connector. You can turn the lights on and carefully move the connector and wiggle the cables and see if the light goes off/on.