How to fix tailgate that doesn’t lock?
which part is broken? Your local mechanic could look at it and tell you where to go if they can’t fix it
My experience a broken wire in the wiring that goes between the tailgate and the body.
Try lubing the mechanism. I fixed my Corolla’s stuck hood latch with a little wd40 to clean it up, followed by a little motor oil. it worked so well on the Corolla that I did the same on my truck. I didn’t realize how hard to use the truck’s hood latch had become over time. Now it is smooth as silk.