It's gotta be the headlight switch right?

You may have a bad, loose, or corroded connection at the brass connector in harness at switch. Remove female spade connector from its plastic housing, and examine. This area of harness sees a lot of moisture from wet feet over the years, and if you live in the snow belt, a that switch has seen a lot of salty water which is very corrosive to brass & copper.