Minecraft wiki entry for Durability, associated text: Direct attacks from mobs and other players
This includes Strength and Weakness status effects or extra damage from enchantments.
Getting hit with an arrow, shulker bullet, thrown trident, egg, snowball, or fireball
This includes extra damage from enchantments
Getting hit with a fireball
Getting hit with an egg or snowball
Getting struck by lightning
Touching a block of fire, lava, magma block (does not damage netherite armor)
Moving into cactus, or in grown sweet berry bush
Explosions (including fireworks, but deals more than one point of durability)