It is hard to guess, why the photos on your Mac have vanished. Can you give us a bit additional background information, please?
What has recently changed on your Mac? Did you upgrade to a new system version? Is the version shown below your question still the current version or did you recently upgrade to a newr version? The most recent version is macOS 10.15.5 Catalina.
Or did enable iCloud Photos on some of your devices? Could it be that iCloud photos is now enabled on your Mac and an iPhone or iPad, and you deleted photos on one of your other devices?
Have you moved the Photos Library to a different location? Where is the Photos Library stored?
Sometimes, after a system update, it can happen, that Photos will switch to a default library in your Pictures folder, if it cannot find or access your main Photos Library.
Try the following, to check your Photos Library.
- Quit Photos, if it is running.
- Hold down the options key, while launching Photos again.
- Release the Options key ⌥, when you are seeing the Library Chooser dialog. Then look for a different library in the panel. Try them all in turn to search for the missing photos.