Curse of the Vanishing is an enchantment you want to avoid, the reason being as it will render any item it is on upon death useless. The reason being is that when you die, the item will despawn and disappear, and it will do this even if it’s in a chest or someone else’s inventory.
That said, if you want to avoid the effects of Curse of the Vanishing, you can do so by placing whatever item it is on inside a shulker box. Doing so will prevent the item from despawning upon death.
Along with this, you can also set the gamerule keepinventory to true. You can chang this command either in the create a world menu or by typing /gamerule keepinventory in chat and hitting enter.
Once you have done either of those things, you won’t need to worry about loosing an item with Curse of the Vanishing or any items in the game. However, you rather go with the shulker box option, you can get by killing two shulker mobs found in the End City.
These mobs will drop a material called shulker shells, and you use those shells to make a shulker box by placing them inside a table with a chest.
Check out some of our other fantastic Minecraft guides!