The Curse of Vanishing enchantment lets you curse an item in the game. When an item is cursed with this enchantment, the cursed item will disappear when a player dies in the game (instead of being dropped after the player dies). You can add the Curse of Vanishing enchantment to any tool, weapon or armor using an enchanting table, anvil, or game command.
Further information you can read - Curse of Vanishing
| Minecraft Cartography Table