chicadee, when you say the trailer brakes aren't working, do you mean they don't engage when you step on the brakes in the tow vehicle or when you pull the safety pin that applies the trailer brakes if your tow hitch becomes disconnected, or both?
If the brakes don't apply when you pull the safety pin (disconnect) then the problem is in the trailer - possibly a bad wiring connection (maybe the ground, white wire).
The only other wire to the brakes is the hot, blue wire. Inspect those and all the connections you find. You'll have to try to move the trailer when you pull the safety pin, if the wheels don't turn, the brakes are applied. Reinsert the pin, because with it out, the trailer battery will drain quickly.
Now, if the trailer side is OK, then the problem is in the brake controller of your tow vehicle or in its wiring. Have you possibly accidentally turned the controller off? I did that once on an old tow vehicle and a controller with manual switches. Do you have a 7-blade plug tester that can tell you if the tow vehicle is sending a braking signal to the trailer when you step on the brakes? If not, you should get one. Here's a link to the kind I have:
https://www.amazon.com/CURT-58270-Vehicle-Socket-Trailer/dp/B001EOWQY4 It also allows you to test your charging circuit, the turn signals and running lights circuit.
- Jack