Assumes you have brew installed.
Install pyenv.
brew install pyenv
Check what versions of python are available.
pyenv install --list
Install a version.
pyenv install 3.9.1
If you run into some error such as "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun" then you may need to install xcode.
xcode-select --install
Once pyenv has installed python we can then use it to set our global version.
pyenv global 3.9.1
# and verify it worked
pyenv version
3.9.1 (set by /Users/jjack/.pyenv/version)