In Minecraft Java Edition, you can specify the profession of a villager you summon using the VillagerData
NBT tag. For example, the below command spawns a librarian villager:
/summon villager X Y Z {VillagerData:{Profession:"minecraft:librarian"}}
Since NBT does not exist in Bedrock Edition, the above commands will not work there.
How do I summon a villager with a certain profession in Minecraft Bedrock Edition?