Having the Mending Enchantment on your equipment makes them last longer as there are a lot of sources of XP in the game, especially in combat, while Unbreaking gives them additional durability so they last for longer.
These two Enchantments should be a staple on all equipment except for bows. Recovers item's durability when gaining experience
Best Enchanments Overall Best Enchantments Enchantment