It’s on the top of the Homebrew homepage.
From a Terminal prompt:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install wget is an example of how to use Homebrew to install another application (in this case,
wget) after brew is already installed.
Before about 2020, the command given on the Homebrew page was:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"