Note:
1. Those photos/videos deleted before "Recently deleted" is enabled cannot be recovered. You can turn it on at Album > Settings>Recently deleted.
2. Deleted photos can only be stored in Recently deleted for 30 days. After 30 days, these photos will be deleted permanently.
Google Photos App:
You can click Menu button/Library > Trash to check the recently deleted photos and videos.
You can check detailed information at https://support.google.com/photos/answer/6128858?hl=en&co=GENIE.Platform%3DAndroid
Google Files--Safe Folder:
The primary function of Safe Folder is to ensure the privacy of files, so any files deleted within Safe Folder cannot be recovered. Please understand this.
Note:
When you reset your phone to factory settings, all pictures and videos stored on the phone cannot be restored, unless they are backed up on a server such as Google Drive. If your pictures and videos are stored on Google Drive, you can easily retrieve them by logging back into your Google account on the phone and enabling syncing in Google Photos, the content stored in Google Drive will be synchronized to your phone.