Best. FilthyGorilla44 β€’ 9 mo. ago. They spawn naturally but cannot be made with regular villagers. It’s pretty easy to have a monster spawner (bedrock) or a regular mob farm on both version with a drowning system at the bottom or simple sorting to get only zombie villagers. 1.
Press the button to spawn a villager. Save & quit, then reload, to confirm that the the villager is kept in the world save. Open the world, flip the lever, and start a stopwatch. After about 10-15 seconds, close Minecraft without exiting the world (for example, in Windows 10 press alt-F4). Reopen Minecraft and reopen the test world.

It's not only mobs despawning at random that is the issue although I have witnessed it happen a few times on my worlds, but even when name tagged and in a well lit and protected enclosure, sometimes mobs, even Villagers and tamed Wolves etc, automatically despawn, and for no apparent or good reason.

You rename them using the anvil, and then apply to given mob. Once named, the mob will not despawn. Of course, hostile mobs will remain hostile, mortal and in case of some, like creepers, suicidal, but at least they don't despawn. Additionally, you get monster's name over their head.
Oh well, i though that zombie villagers are another kind Convert them immediately otherwise they will despawn like any other hostile mob. I'm assuming they trapped it to convert it so the simplest option is being prepared for that. Not all zombies will pick up items, it depends partly on difficulty level.
A named villager keeps its name when transformed into a zombie villager. A named zombie villager keeps its name when cured. Wandering traders still despawn even if they are named, or in a minecart or boat. A named wither's boss bar displays its name instead of "Wither". Naming an ender dragon with commands also displays the name in the boss bar. O2IUOr. 287 541 781 833 734 228 25 473

how to make zombie villager not despawn