1. Python installation via Homebrew

Homebrew maintains its python version schema as python@X.Y. For example, to install python 3.11, it would be brew install python@3.11

After the installation, it will tell you the installed location.

Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to
`python3.11`, `python3.11-config`, `pip3.11` etc., respectively, are installed into
/opt/homebrew/opt/python@3.11/libexec/bin # Here

Unlink existing symbolic link.

$ unlink /usr/local/bin/python

Create symbolic link again with the desired python version.

$ sudo ln -s /opt/homebrew/opt/python@3.11/libexec/bin/python3 /usr/local/bin/python

Close and reopen the Terminal app and check if it works.

$ python --version
Python 3.11.11

Reference