Start at the pigtail. Determine if it's the truck or the trailer and go
from there.
Earlier this year I discovered something about my F150 I did not know.
There's a separate fuse for trailer connections. I had replaced the
left rear light fixture on the trailer but still had no brake lights.
Trailer mechanic at local shop popped open front passenger kick panel
and discovered a blown fuse. He replaced the fuse and now I have full
lights on the trailer. Maybe your truck, whatever make it might be,
has a similar setup and it may only be a fuse onboard the truck.
Ford has fuses for each of the trailer and car brake lights.