You should first check the Recently Deleted album when you mistakenly delete photos and videos from the Photos app. If you accidentally delete the photo library from the Finder, check the deleted items in the Trash can.
Whether the deleted photos library is moved to the Trash can depend on the way you deleted files on Mac. Just click the Mac Trash to check whether the deleted photos library is there, if you find the photos library there, right-click it and choose Put Back.
In case you permanently delete files on Mac such as using the Option - Command - Delete keys, the deleted items won't go to the Trash, you can only try to recover them using third-party data recovery software if there is no backup.
iBoysoft Data Recovery for Mac is a good choice, it can scan the selected drive/volume for deleted/lost files, enable you to filter and preview the scanned results, and then you can recover desired items to a different location. You should stop writing data to the Mac hard drive and perform the recovery ASAP, the deleted items can not recovered once they are overwritten.