tag @s remove earth
tag @s remove water
tag @s remove lightning
tag @s remove blank
execute if data storage sorcerer {spell:["earth"]} run tag @s add earth
execute if data storage sorcerer {spell:["water"]} run tag @s add water
execute if data storage sorcerer {spell:["lightning"]} run tag @s add lightning
execute if data storage sorcerer {spell:["blank"]} run tag @s add blank