This will generate a command machine that will give you a spawn egg. When you place down the spawn egg, don't expect the sky grid to be generated instantly. In fact, it takes a very long time! But it will be worth it. (Note: Like all my command creations, only activate this with a redstone block. No buttons.)
I have a nether version of this command, it's listed here:
https://minecraftcommand.science/commands/46254