When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
sounds like a bad brake light switch. Check under the brake pedal for it. disconnect it. If that solve your problem then it needs to be replaced. Google would have helped you with this.
Disconnect the switch connector and manually jumper the wires, mimicking the switch behavior. If that works properly, the switch is bad. Or, you could disconnect the switch and test it with a multimeter.
If the switch is fine, then you'll have to do actual troubleshooting.