That is only possible with Optifine or something similar, depending on the Optifine version you will have to rename the "mcpatcher" folder to "Optifine".
Try this:
matchItems=minecraft:netherite_sword
nbt.display.Name=ipattern:*Ghosts Sword*
tile=ghosts_sword
model=
tile= is your texture
model= a sword json