Detect death in Minecraft?

Tr
1

How can I determine with command whether an entity, for example. Who died wither?

an

I guess you mean by command block?

By counting the entities and noting that there's now one less.

If you just want to find out whether it exists or not, you can run a command via the entity.

execute as @e [type = wither_boss] run setblock 100 100 100 redstone_block

Something like that, for example (I didn't check whether everything was correct with the command, just a rough example).

Unfortunately, there's nothing to directly determine death.