Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Paste that in a macOS Terminal or Linux shell prompt.
The script explains what it will do and then pauses before it does it. Read about other installation options .