/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
More installation information and options: https://docs.brew.sh/Installation.
If running Linux or WSL, there are some pre-requisite packages to install.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
Download the uninstall script and run /bin/bash uninstall.sh --help
to view more uninstall options.