Enable cheats in your world
Open chat and type `/give @p command_block`
Place the command block on the ground
Right-click or tap the command block to open it
Enter a command in the text box
Choose the command block type if needed
Set the redstone mode to Needs Redstone or Always Active
Power it with a button, lever, pressure plate, or redstone signal if using Needs Redstone
Close the menu
Test the command block by activating it
Use `/setblock`, `/give`, `/tp`, `/summon`, or other commands as needed
Use `@p`, `@a`, `@r`, or `@e` for target selection
Chain command blocks together if needed
Adjust Conditional and Redstone settings for advanced setups
