This question already has an answer here:
When I right-click -> "Open with" -> ...
I see an option for atom 1.19.3 and 1.19.1.
However Spotlight locates only one Atom.app (which is found in Applications).
Opening with 1.19.1 succeeds. However it turns out my version of Atom is actually 1.19.3.
Opening with 1.19.3 however fails to do anything.
I notice from the same screenshot there is a similar duplication going on with VSCode.
What is the problem with my system? And how to repair it?