Parking brake light indicator not turning on

You don't need to "try" a switch, rather, check the circuit end to end. Remove the switch wire from the switch. These work just like the dome/ courtesy lamps. That is, the lamp is insulated, and is fed power to one side of the lamp, and the other end of the lamp appears at the switch wire. when the switch is "made" it grounds that wire and completes the circuit. So ground the wire. Does the lamp light? If so, you are right, either bad switch or poor adjustment. These switches corrode / get rusty over the years as does the mounting.
Okay, straight grounding it did not work. Would the light it's self having a ground cause a problem? Looking at it looks like after market non stock is being used to make aftermarket gauges work in it.
Brown wire is connected to main line that goes to the switch and power I assume, black wire would be ground for the light

PXL_20220917_172815653.jpg