Place a block with one command: position, replace/destroy/keep mode.
The /setblock command places a single block at the given coordinates. Besides the block itself you can set its state — facing, waterlogged state, growth stage and similar properties.
Some blocks hold extra data: a chest stores its contents, a spawner stores mob settings, a command block stores the command it runs.
The mode decides behaviour: replace overwrites anything, destroy breaks first, keep only fills empty space.
Enter coordinates and pick a block.
Set the block state if it matters for how the block behaves.
Choose the placement mode.
Copy the command.
Many blocks have several states: stairs face a direction, doors open the other way, fences connect to neighbours. Set the state explicitly.
A chest block stores its items in a separate data field. It's easier to place an empty chest and fill it with /item replace.