The control for command blocks depends on your Minecraft version. Check the matching instructions below.
enable-command-block=true in server.properties. For 1.21.9–1.21.10, use gamerule commandBlocksEnabled true while the server is running. For 1.21.11 and newer, including 26.x, use gamerule minecraft:command_blocks_work true.Command blocks aren't in the creative inventory. As an op in creative mode, run:
/give @s command_block
You also need to be an op (permission level 2 or higher) to edit what's inside a command block.
Stop command block messages filling the chat. By default, ops see a chat message every time a command block runs. Turn that off with gamerule command_block_output false. On versions before 1.21.11 the rule is called commandBlockOutput.
Version references: 1.21.9 server-property changes and 1.21.11 game-rule names.