Java 26.2
Block Commands
Position
Stone
Single block placement
/setblock ~ ~ ~ minecraft:stone
Setblock and fill
A /fill is a /setblock with a second corner and a mode. The mode is what people get wrong: replace overwrites everything, keep only fills air, hollow and outline leave the interior alone. Choose the block, its state and NBT here, then pick the mode deliberately.
Setblock at exact coordinates
/setblock ~ ~ ~ minecraft:stoneOne block placed precisely; swap the mode to keep or destroy to change how existing blocks are treated.
Hollow room in one command
/fill 0 64 0 10 68 10 minecraft:oak_planks hollowhollow builds the shell and clears the interior -- an instant room.
Clear a volume
/fill ~-5 ~ ~-5 ~5 ~5 ~5 minecraft:airFilling with air is the standard bulk-delete.
replace overwrites every block in the region; destroy also drops the broken blocks as items; keep only fills air and leaves existing blocks; hollow fills just the outer shell with air inside; outline fills only the edges. Picking the wrong mode is the most common /fill mistake.
A single /fill is capped at 32,768 blocks by default. Split a larger area into several /fill commands, or raise the commandModificationBlockLimit gamerule on versions that expose it.
Add block-entity NBT to the block. /setblock ... chest{Items:[...]} places the chest pre-filled. The editor lets you build the block state and NBT so you do not hand-write the braces.
Set the relevant block state, such as facing=north on stairs or axis=y on logs. The generator appends the [state=value] block-state string that controls orientation.
Java 26.2
Position
Single block placement
/setblock ~ ~ ~ minecraft:stone