OK
Apps like MacKeeper are generally held (round here) to be counterproductive. They can't "clean" a mac better than MacOS does itself, and often cause damage. In particular duplicate file removal can damage photos libraries, because a photo library has (and needs) multiple versions of the same file: Original, previews, thumbnails etc. If a file duplicate remover removes any of these the library will be damaged.
I would suggest removing Mackeeper, and App cleaner (especially if it has any automatic functions),
Then try creating a new empty library (hold down the option key while starting photos, and click create new. Name it somthing like test library. Import some images in to it, and see if it behaves correctly, wihtout the problems you are seeing. This will tell us if the problem is with photos app, or something specific with the library.
By the way - you can also check with the library chooser where you library is stored.
if the test library works, I would next try booting into safe mode and trying your standard libary (you will need to change to that from the test library using the option key start again). See how to start your mac in safe mode:
https://support.apple.com/en-gb/guide/mac-help/mh21245/mac
If safe mode still shows the fault, then we may need to try a library repair. You will need to backup the library first - ideally by using time machine (macs built in backup software) to backup to an external drive. You will need a large and empty external drive for this. If that is not possible, then you can drag the library (it should be in the pictures folder) to an external drive.
then trying a library repair: (You will need plenty of free space on your drive for this to work, and it can take a long time - especially if your library is large). See instructions at the bottom of this user tip from leonie for how to repair the library. (in fact it is worth reading the whole user tip)
https://discussions.apple.com/docs/DOC-250002264