how do I check if player crafted custom item

I Am really new to datapacks, so I tried using ChatGPT as you can guess, it didn't work. I got the custom crafting working, but I can't figure out how to detect when it's crafted. I was trying to make a revival item for my friend's hardcore world since we couldn't find any mod or datapack that fit our needs.

Continue to help post