Collect Your First Mob Spawner
Get the Right Tool
You'll need a pickaxe enchanted with Silk Touch. Any pickaxe material works—wood, stone, iron, diamond, or netherite—as long as it has the Silk Touch enchantment. If you don't have one yet, use an enchanting table or anvil to add Silk Touch to a pickaxe you own.
Mine the Spawner
Locate a mob spawner in a dungeon, mineshaft, or other generated structure. Approach it with your Silk Touch pickaxe and break it like you would any other block. Instead of dropping experience orbs and nothing else, the spawner will drop as an item you can pick up.
Place It Anywhere
Carry the spawner to your chosen location—your farm, base, or storage area. Place it like a normal block. When you do, it will retain the exact mob type it originally contained. A spawner that held zombies will still spawn zombies; one with creepers will spawn creepers.
Activate It
Once placed, the spawner works immediately. Make sure mobs have space to spawn and that you're within the activation range. The spawner will function just as it did in its original location.