Minecraft wiki entry for Iron_Golem, associated text: When an iron golem kills any mob, the player can obtain items dropped by the mob, but no experience orbs. Iron golems that kill a raid mob in Bedrock Edition also causes the mob to drop its raid loot, even when the mob wasn't attacked by the player before it is killed.