How do I place a mob spawner inside another block?

Try using https://codecrafted.net/blockdesigner. It's for Minecraft 1.12, so it's a bit outdated and will not work properly on 1.16. Here is a tutorial:

Alternatively, try watching this:

It doesn't explain how to do it fully, so you need to work it out yourself, and update it to later versions (if needed).