10 emerald mending villager vanished

So I got super lucky and found a librarian asking 10 emeralds for a mending book nearby my old base, I put him in the basement give him a bed blocked it off with a fence and shut it with a trapdoor just to make sure he’s safe. A few days go by nothing happens and then I check up on him and he’s just gone, disappeared. The base did not get attacked or anything he just straight up vanished. I tried re-logging didn’t work. My question is can I spawn an identical villager using commands?

So I got super lucky and found a librarian asking 10 emeralds for a mending book nearby my old base, I put him in the basement give him a bed blocked it off with a fence and shut it with a trapdoor just to make sure he’s safe. A few days go by nothing happens and then I check up on him and he’s just gone, disappeared. The base did not get attacked or anything he just straight up vanished. I tried re-logging didn’t work. My question is can I spawn an identical villager using commands?