Typing clear looks like it empties the window. Scroll up and everything is still there, including the token you just printed.
clear pushes the old content up and gives you a blank screen, and many terminals keep the scrollback. In Terminal on a Mac the shortcut that really wipes it is Command-K, listed in the menu as Clear to Start. Everything above the prompt is gone, scrollback included.
From a script, the escape sequence for erasing the saved lines does the same in Terminal, iTerm2 and most xterm-like terminals:
clear && printf '\033[3J'
Its sibling Command-L clears only back to the previous mark, which is handy if you want to drop the output of the last command and keep the rest. Marks are the same ones Command-Up Arrow jumps between.
Command-K is worth pressing, I think, before you share your screen or a screenshot, and after anything printed a password or key. Keep in mind it does nothing to your shell history or to log files. If the secret was part of the command line itself, it is still in ~/.zsh_history, so that needs its own cleanup.
Further reading: Keyboard shortcuts in Terminal on Mac (Apple Support), Xterm control sequences (ED 3)