How do I give everyone except for me a potion effect?
Solution 1:
on top of what Nik said, i believe you can also use the name
selector to it, making it something like;
execute as @a[name=!<your_ign>] if entity <entity_to_check> run effect give @s <effect> <duration>