My headlights just started turning off for a period of time, my brights work. on 2005 Buick LaCrosse

In the past two days, my lights are on and working fine, then they turn off. I then turn my brights on and after several miles, my headlights come back on again.

2 answers
same thing happened to my cousin
POSS HEADLIGHT RELAY IS STICKING