How to execute commands in Minecraft.
Execute generation commands using the 'function' in Minecraft.
The way to do this depends on the edition of Minecraft and the device on which it runs. Currently, it is not possible to run Minecraft on the Switch or Xbox.