The easiest way to retrieve deleted emails from Yahoo is by quickly going to the Trash folder and undeleting them.
If you need to reset your iPhone to factory settings to resolve an issue, you can back it up to iCloud first and then restore it to keep your data.