You can turn on cheats in Minecraft by enabling it when you create your world, or by going into your Settings.
You can teleport almost anywhere in Minecraft using the "/tp" command, but you'll need to enable cheats in your world first.
In survival mode, this only works if you actually have the block you’re facing. Otherwise, nothing happens. And in creative mode, whether you have the block in your inventory or not, it will always ...