There's no inline, rich command-line editing within Vim in the way many might expect (i.e. like Bash command-line editing with "vi-mode") but you can edit commands with a feature that is arguably even better than that; a feature that even lets you yank/put parts of earlier commands into your in-progress command.
I'm talking about the command-line window.
To open this while in the middle of entering a command (after you hit :) type Ctrl+F
You will see your full Ex command history including your in-progress command. This window is just like any other Vim buffer. You'll start out in Normal mode and can edit your current command or any previous commands the same way you'd edit any other text.
When you're ready to submit a command make sure the cursor is on its line, and hit Enter. (Doesn't matter what mode you're in.)
If you want to bail out without submitting any command you can just use :q to quit the command-line window (no
! necessary, even if you made changes).
Or, if you want to continue editing a command back on the regular command-line hit Ctrl+C with the cursor over the correct command.
BTW, you can also open this window from any buffer by entering q: while in Normal mode.
Finally, you have this same capability for editing search patterns: q/ or q?.
:h cmdwin for complete details.