im trying to make a command block chain that will detect for a snowball with a custom name and summon lightning onto it. I am having a lot of trouble with the new command block mechanics.
The easiest way to do this is with an execute command like:
/execute at @e[type=snowball,name="name"] run summon lightning_bolt ~ ~ ~
I suggest that you look at this post here, and this website here for more information and help.