Mistakes happen. But on the iPhone, they can be undone very easily. Just shake your phone to undo.
While the Mac has Command-Z, the iPhone has its own unique way of fixing typing mistakes: Shake to Undo. Shaking your device to go back or undo a mistake has been around since 2009...