Before you run Homebrew you need to install the MacOS Command Line Tools that come in Xcode. To do this, open the App Store, search for and install Xcode. This can take upwards of 30' or more.
The Homebrew web site has further information.
To install Homebrew from the command prompt (e.g. Terminal) - you will need sudo permission.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
The install script will take 10' or so to download packages, install and configure.
You may need to run the echo commands to add brew to the PATH environment variable. The command looks something like...
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/name/.profileeval "$(/opt/homebrew/bin/brew shellenv)"
For previous versions it looked like...
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/name/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/name/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"