How do I make arrows despawn faster?

Here is some context: I've made some command block code to make lightning arrows. However, I want the arrows to instantaneously despawn after an arrow is shot. How do I do this?

Here is the command block code if you need it.

execute at @e[type=minecraft:arrow] run summon minecraft:lightning_bolt


Solution 1:

 /execute as @e[type=minecraft:arrow] run data modify @s {Life:0}

This in another command block should instantly destroy every arrow. A similar command using /kill instead should also have the same effect.