Minecraft wiki entry for Death_messages, associated text: <player> was killed by magic
Appears when the player is killed by Instant Damage given with /effect, by an evoker fang summoned with /summon or by an arrow of harming shot from a dispenser or summoned with /summon.
<player> was killed by magic whilst trying to escape <player/mob>
Appears when the player is hurt by a player or mob then killed by Instant Damage or an evoker fang that didn't originate from a player or mob.
<player> was killed by <player/mob> using magic
Appears when the player is killed by a potion or arrow of Harming shot by a player or mob, by an evoker fang summoned by an evoker or by the extra damage from a guardian's or elder guardian's laser.
If the player was killed by a splash potion of Harming shot from a dispenser or summoned with /summon, the death message is <player> was killed by Potion using magic.
If the player was killed by the cloud created by a lingering potion of Harming shot from a dispenser or summoned with /summon, the death message is <player> was killed by Area Effect Cloud using magic.
<player> was killed by <player/mob> using <item>
Appears when the player is killed by one of the aforementioned ways but the player or mob is holding a renamed item during the player's death.