This command converts the block right below your feet into a custom Minecraft mob spawner. If the variety of Minecraft mob spawners feels limited in the survival mode, you can get custom spawners using this command: How to Get Custom Spawners in Survival Minecraft Bastion remnants with magma cube spawners.Dungeons with a zombie, spider, and skeleton spawners.On the other hand, if you are playing in survival game mode, you can find spawners in the following places: Irrespective of that, you can simply use a spawn egg on the spawner to assign any particular mob to it.
By default, the spawner will be empty in Bedrock and will have a Pig on the Java edition. If you are in the creative mode, you can get spawners using the “/give” command and with your creative inventory too if you are on the Bedrock edition.