I agree with TheDurk, sounds like the stalk if not bulb, fuse, relay. Pop out the dual filament (HI/LO) H4 bulb on the non-battery side (much easier) and test that one first. Inspect visually for broken filament or metal spray inside inside the glass. Then test electrically: touch across all pairs of terminals with a 9V battery will glow after about a second with fresh battery. Test across all and see what lights up. One pair lights the low beam (the one in the metal cup), the parallel pair lights the high beam, the third lights them both if your battery isn't getting too dead. If bulb is good, check the other side. Loosen battery hold-down to move battery slightly, much easier.
Sure they could both go out at *exactly* the same time but somewhat unlikely unless you hit a HUGE bump (shock) or redlined the crap out of it for extended period (vibration).
If both bulbs good, test the stalk. Over years of use, if it's twisted on with too much force, it's possible to twist it past "ON", to where the lights turn off. Mine will do that if I twist then hold, so I twist it on with just enough force to light the beams without overrunning the contact.