This is an "oldy, but goody". And I am posting it, because the way you accomplish this keeps changing over the years every now and then with newer macOS versions.
So here is the quick recipe for adding an additional folder to the command line search path on macOS Monterey (tested with macOS 13.2).
Updated for macOS 13.2 aka Ventura.
Edit $HOME/._zsh_profile with your favorite editor. On the command line, you can simply run for example:
nano $HOME/.zsh_profile
The easiest is to simply add a line like:
export PATH=$PATH:/usr/local/bin/younameit
And then save that file, in nano with Control + X.
Don't forget to parse that file again in each open terminal with:
source ~/.zsh_profile
Every time, I do this, I have to run this line here. Simply reopening the terminal app won't work for me.