How to fix “Zsh: command not found – brew” on MacBook Silicon?

Homebrew installation problem
Homebrew can be installed on Apple silicon M1 devices but the installation script put the files into this directory
(/opt/homebrew)
So, when you try to use any command like “brew help”
you will get this error message “Zsh: command not found – brew”
which means you have to move homebrew to its correct place under usr/local folder to be fixed.
To correct the installation you have to use these commands separately on terminal
1) Write this command on terminal; and press return
export PATH="/opt/homebrew/bin:$PATH"
2) Then this command on terminal and press return
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $HOME/.zshrc
you will see nothing after these commands and this is good.
now, write the command “brew help”
you will find that everything is ok and homebrew is working correctly 🙂
Please don’t hesitate to contact me if you faced any problem while applying the process.