Guidance please? Rewiring the light switch in an old bathroom house that I can't figure out for the life of me!
You determine which of the two cables on the right is connected to the light.

Turn off the breaker to the line hot (cable on the left). Fasten the line hot to one pole of a simple switch, and fasten the black from the candidate cable (say the upper one on the right) to the other pole of the switch. (Keep the whites out of the way for the time being.)

Turn the breaker back on and use your non-contact voltage tester to see if the black at the lamp is powered when the switch is on and unpowered when the switch is off. If it is, then go turn the breaker off and connect the white in the line cable to the white in the cable whose black is connected to the switch. Now turn the breaker on and the switch on and the light should come on.

To complete the job go turn the breaker off, fold the wires, and screw in the switch. Cap the wires to the other cable which is not going to be used. Put on a cover plate. Turn the breaker on and verify operation.

NB: You should really verify that the cable you have energized goes only to the light and not also to some other cable that should not be powered.