How have you changed the way you use command line command(s) recently?
In my case, I've started using rsync instead of cp to copy directories because you can use its --delete option to replace an existing directory, like how the macOS Finder behaves when copying.
Configure zsh so you can put a space before the command and it doesn't get saved to the histfile. Incognito mode for the terminal.