When you delete an image from your iPhone, it goes to the Recently Deleted folder in your device’s picture app. It remains there for 30 days before being permanently deleted. Within this time frame, you can restore the pic from this folder.
For more information, check out this detailed guide on how to recover permanently deleted photos on an iPhone.