what's wrong with my macro?

the game refuses to run this function and i'm not sure why beyond it being something to do with the macro

# datapack:main
execute as @e[type=minecraft:item,nbt={OnGround: 1b}] run function datapack:print_item_name with entity @s Item.components
# datapack:print_item_name
$execute on origin run tellraw @a [$("minecraft:item_name"), {"text": " (", "color": "gray"}, {"selector": "@s", "color": "gray"}, {"text": ")", "color": "gray"}]
kill @s
Continue to help post