Mending is an expensive and rare enchantment in Minecraft. You’ll therefore have to obtain it through enchantment books that have spawned naturally.