Photoshop breaks "open with" functionality in Windows with every upgrade

I recently upgraded to Photoshop 2024. However, as you can see in the image above, if I right click on an image file (of any format) and select "Open with," it still shows "Adobe Photoshop 2023," and the icon is a generic windows icon.
If I select "Adobe Photoshop 2023," nothing happens. No version of Photoshop opens, and the "Open with" dialog re-appears.
I've seen on this forum and other discussion groups in the internet that others have had problems similar to this going back as far as 2011. Solutions involve manually editing the registry, which I try to avoid as much as possible.
The thing is, this has happened to me at least once before, when I upgraded from Photoshop 2022 to Photoshop 2023. It's possibly happned with previous upgrades, but I am not 100% certain.
In any case, I am looking for a solution that not only fixes this current problem, but also ensure that I will not have to do manual registry edits with every upgrade.
How do I resolve this issue?
