How can I detect the death of a mob in Minecraft version 1.16?

In Minecraft, I am making a custom adventure map and there is an Evoker bossfight named "Lunatic Cultist". I wanted to check when it died, but none of the tutorials I found actually worked (probably because they are outdated).

How can I check when the Lunatic Cultist dies?


Give your boss a custom loot table, using the DeathLootTable NBT tag, that drops a special item (potentially with custom NBT tags, like lore, so that it cannot be counterfeited). Then make the next part of your map contingent on the player surrendering that item (use an item sorter to check that they have in fact surrendered the correct item).