Use an anvil
Place the damaged trident in the first slot
Place another trident in the second slot to combine durability
Use a Mending enchanted trident and gain XP to repair it
Use the Unbreaking enchantment to reduce durability loss
If needed, craft or obtain a new trident from drowned mobs
