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 ...
Once placed, command blocks can be programmed with commands such as /setblock, /tp, or /summon to create interactive features. Builders use them for teleportation hubs, automated weather control, or ...