i record every command in .zsh_history (like everybody else does by default, but mine is configured to not have a size limit)
i often do things like
history | rg ..
it helps when you roughly know what you want to find, but want to check some detail you forgot