Depending on the amount of data you are attempting to recover, the free trial versions of commercial recovery solutions like Disk Drill may be able to help you. Some freeware products like PhotoRec exist but are not able to get your iPhone data back. The best way to protect the data on your iPhone and get it back for free if it’s lost is to back up your phone’s data regularly.