It's no secret that the python3 repository package is always a few versions behind the Python Software Foundation's current main release. At my time of writing, I am using Linux Mint 21.3 and running python3 --version reveals that I'm using v3.10.12 while Python's current main release is v3.12.2.
So how can you install the latest stable Python version on Ubuntu or Mint?
Credit
I followed along with