Is it a good idea to keep installing new versions of python to improve the performance of Rhino and Grasshopper? Yesterday I installed version 3.9. Earlier I had version 3.7.
The Python 3.7 or 3.9 you have installed does not directly impact Rhino.
Rhino embeds a version of IronPython, currently I believe it is 2.7.9. This is the python engine that Rhino and GH use, it is installed for you when you install Rhino, not easily accessible from outside Rhino, and cannot be changed.
Additionally, while you can use this python engine to access Rhino’s internal, there is very little Rhino core code that is actually written in Python, so changing python versions would only have an impact on the performance of scripts running in Rhino, and not by much in most cases.