How to modify the lore of an item to include the players name?

I need a way to modify the data of an item to include the following: Crafted by

I know with commands like tellraw you can include selectors but I can't figure out how to do this with lore.

I also don't want this to happen to every item. I'm going to implement a way for players to add it only to items they choose.

Continue to help post