I haven’t dealt with a brake light switch for 50 years when I replaced the switch on my 1947 Pontiac. This switch was on the master cylinder. However, I think more modern cars the switch is under the dashboard, clips on, is activated by the brake pedal lever. I think you can unplug a connector from the switch. If this is the case, unplug the connector and using a multimeter, set it on the D.C. voltage scale. With the negative lead of the multimeter connected to a chassis ground, insert the postive lead into one of the sockets on the connector. With the ignition switch on, see if the multitester indicates a voltage. If it doesn’t, put the lead into the other socket. If you are not getting voltage to the brake switch, the problem is before the switch. A fuse may be blown. If you do get voltage, set the multitester on the ohm scale. The ohm should be infinite. Press the pedal and the ohms should be zero. If this isn’t the case, the brake light switch is defective.
Perhaps someone more knowledgeable than I am can advise.