Summoning Entities From a Loot Table / Tagging items

I'm trying to summon an entity when calling a loot table, but after reading some documentation, it has recommended me to detect an item with a tag

Reading old code, people use:

"functions": [
            {
              "function": "set_nbt",
              "tag": "{Tags:['summon']}"
            }
          ]

but this doesn't seem to work for me in recent versions.

I'm using this code to check for the item:

execute if entity @e[type=minecraft:item,tag="summon"] run ...

How do I give the item a tag or do I need to use custom data or something else?

Continue to help post