Python not working after actualising

Hi. I had downloaded and installed python 3.11 as some program didn’t work on my 3.10.3. I added PATH to 3.11 but it still started on 3.10. Then I uninstalled 3.10 as I thought it might run as default but now script doesn’t run at all still wanting to have 3.10.
Python works on command line but doesn’t run directly from *.py file as it uses to. Any ideas how to fix it?

Check the Windows settings “Apps → Default apps” and if the .py file type is “associated with a Python app that has a rocket on its icon”.