Unable to install Homebrew in Terminal

The error is rather clearly informing you that the command you executed is the old ruby based installer. You should go to the Homebrew website and re-copy the bash based installer from the https://brew.sh website.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"