The comments above were useful. I will explain how i resolved it in case someone else has a similar issue.
There was no installation folder for the python 3.10.8 in the programs folder, i want to believe it was because of the installed 3.9.9 version which had a folder Python39 in the default installation location.
So I uninstalled and reinstalled the newer version (3.10.8) to a custom location/folder. I opened the Python\Scripts folder of the new installation in the command line. I was able to install pandas with
pip install pandas
I recently installed a newer version of python version 3.10.8. I still have the old version running version 3.9.9.
I would like to install pandas on the new python installation using pip install pandas command. I don't know how to specify in the terminal so that it installs on the python 3.10.8 version installation.
Install pandas on different python versions on same computer(Windows 10)