Rename Item via Anvil Changes to Custom Model

I am trying to add a way for people to naturally get 3D models in survival without using my commands (/give or what not). I want them to take a specific item and rename it with an anvil to be able to get the 3D Model of it. So like if someone takes a netherite sword and renames it to "Master Sword" it changes to the 3D model that I have in a resource pack and have custom color, name, and lore like the image provided.

Continue to help post