Command + Z undoes the previous pasting command, causing the pictures to disappear on your Mac. To recover those pictures, you just need to redo or reverse the undo command by pressing Shift + Command + Z.
Suppose that doesn't work, you can use iBoysoft Data Recovery for Mac to scan the SD card with which the pictures were deleted and preview the recoverable files for free. It's an advanced data recovery tool that can recover deleted files on SD cards and other storage devices with a few clicks.
Note that if you have saved new files to the SD card, the deleted pictures may have been overwritten and thus become unrecoverable. Still, you can take the steps below to see if the pictures are recoverable.
Step 1: Free download and install iBoysoft Data Recovery for Mac.
Step 2: Connect the SD card to your Mac.
Step 3: Launch iBoysoft Data Recovery, select the SD card, and tap "Search for Lost Data."
Step 4: Preview the lost pictures.
Step 5: Tick the boxes next to the files you want to restore, then click Recover and designate a storage location for them. Don't save them to the SD card you're currently using for data recovery, as that may overwrite or corrupt data on it.
[Complete Guide]How to Recover Deleted Photos from SD Card