If the path to the Python executable is /usr/bin/python3
then it was installed with Xcode Command Line Tools. This is an alias to the actual location, check if you have this /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin
Don't update or remove Python with Xcode Command Line Tools, this Python is used by the system.
You should use virtual environments to run multiple Python versions. For that you have tools like Pyenv or Rye.