I am using the z Shell (zsh) instead of the default bash, and something wrong happen so that all commands who used to work are no longer recognized:
<
I fixed the issue by opening the terminal preference general tab and changing the Command (complete path) to /bin/bash to default and then editing the ~/.zshrc file.

export PATH="all your path inside the quotes"
...without any whitespace between the PATH=" and save the file.

After saving the file, change the /bin/zsh in your command or select default

...and restart terminal and you should have your zsh shell working again!