2005 honda accord headlight issue

My 2005 honda accord left front headlight low beam keeps going out. I have replaced the bulb and it works for short time and then the low beam quits working. any suggestions where to start?

thanks

Bench test the bulb. Is the low beam filament buned out or does it work ?
If the filament is not burned it’s in the connection. Check for corrosion in the plug end and a tight grab of the connector.
Even a burned out filament could be caused by an intermitent connection spiking each time it comes on.

Are you touching the new bulb when or before you install it?
Do you have to replace the bulb to make it work again, or can you just unplug it and replug it in?