Yes, you can by following this procedure:
Download, install and launch Disk Drill for macOS.
Connect the iPhone X to your computer.
Choose the iPhone’s storage from the disk list.
Click Recover to start scanning your iPhone X for deleted photos.
Select the photos to be restored from the Preview list.
Click the Recover button to restore the lost photos.