Like, all it does is: executing at anybody who has the item or the item's nbt, it'll find every entity that isn't itself (I just used my own in game name, but I actually have no idea how to ddo that in a datapack... maybe use a tag?) in a ..4 radius (less or equal to 4), and will teleport that entity to ^ ^ ^<distance here>
So, it'd be something like this: /execute as @e[nbt={<Item_nbt_here>}] at @s run tp @e[distance=..4,tag=<tag>] ^ ^ ^4