This is a plugin I think that should be added. I did not make the plugin. When the plugin is installed, an entity's head is dropped when killed. Custom changes can be made in the config. It works on bukkit/paper.
Link - https://dev.bukkit.org/projects/trophyheads