If you haven’t enabled automatic iCloud backups and don’t use any app to backup your photos, you can still try and recover them with Disk Drill. It works even in the most desperate situations because Disk Drill has virtually all rercovery options baked in. Still, backups are essential to keep your data intact, so make sure you do backup your iPhone and Mac next time. This will help you recover files even if your Mac went lost or your drive crushed.