I am sure things are simpler if you pay to stay on the latest version of MacOS, but pick up a laptop that has an old version of MacOS (as I did last week) and try to install a modern version of python on it without reaching for your credit card and/or signing up for all sorts of accounts/development programmes. Is it too much to ask to be able to install gcc on a machine that someone has paid > $1000 for?
Search for Xcode asks you to install macshop (or whatever it is called) which in turn asks you to first upgrade your OS, which in turn asks you to install macshop.. etc. Terrible experience, made me pine for Windows.
I got things working, with a lot of googling, but still have no idea how and where things are installed and how to uninstall them.