There is a 90% chance that you don’t know about this. The iPhone has an undo feature! If you accidentally make a change that you would like to undo (e.g. deleting some text) then you can get it back by literally shaking the phone!
See this post for an animation.