Why are my commands applying to everyone instead of just the person with the tag?

Solution 1:

You are overcomplicating your commands so much that this is causing them to fail.

Your overcomplicated version: Simpler and works:
execute
as @e
at @e
if entity @s[tag=glasswalker]
run …
execute
as @e[tag=glasswalker]
at @s
run …
execute
as @a
at @a
if entity @s[tag=earthmage]
run …
execute
as @a[tag=earthmage]
at @s
run …

… and so on.

As for the second command, which doesn't match the style of the commands I showed in the table, there is a different problem—you are testing for custom item names. This is bad practice and should be avoided. See my other question for why and how to fix it.