Photos is installed by macOS, like Mail and Calendar, as Larry said. The Photos.app is just a wrapper with calls to system services. That is why the application is so amazingly small, lee than 60 MB, just the size of a large RAW file.
Reinstalling Photos can help, if the problem is system wide and not just happens for your current library or only in your own user account.
To test this, launch Photos from a different user account (see this help page: Isolating an issue by using another user account). If Photos is working perfectly when launched from the Guest User account, the problem is restricted to your current account and trashing plist files or caches, or containers can help, unless your current library is causing the problem. Test with a new test library as well, if Photos is working on a new Photos Library. (https://help.apple.com/photos/mac/1.2/?lang=en#/pht6d60b524)