Make a custom item: pick the item, give it a coloured name and lore lines, add enchantments at any level, and copy the /give command for your version.
Which Version?
- Java 1.21.5 and newer write text directly (
custom_name={text:"Sword",color:"gold"}) and enchantments as a simple list. - Java 1.20.5 to 1.21.4 use item components with text as JSON strings.
- Java 1.13 to 1.20.4 use NBT tags (
{display:{Name:…}}). - Bedrock Edition's
/givecan't set names, lore or enchantments.
Tips
- Names are italic by default when set by commands; the generator turns italics off unless you tick it.
- Commands can give enchantments above their normal maximum, up to level 255.
- Commands longer than 256 characters must go in a command block.