Run this command in a terminal.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
In ~/.zshenv, set Variable PATH.
export PATH=/opt/homebrew/bin:$PATH
Run this command to make sure everything is ok.
brew help