why is this death detection for 1.21.4 not working

execute as @a if score @s corpse matches 1.. run effect give TycerKirk minecraft:glowing infinite 255 false /scoreboard objectives add corpse deathCount also is there a better way to do it
Continue to help post