I'm afraid that you messed up your system. Python 3.8 is the default Python Ubuntu and some system components rely on a specific version, respectively may not work with other / higher Python version correctly. The priority should be to undo all steps you made, ensure that Python 3.8 is the default and is started when running python3
in the terminal.
It is no problem to install manually multiple versions of Python parallel on the system. A step-by-step guide can be found e.g. at the Real Python website. Import: always use sudo make altinstall
as the final step, to ensure your default system Python is not replaced! pip is typically included in the manual installation of Python.
In case you don't need another Python version installed system-wide, but a per-project installation is sufficient, you can also have a look at pyenv.