You can shake your phone to undo/redo what you have previously typed.
Did You Know...? (iOS Tips & Tricks)
iOSThis is one of my favorites
Just tried it and it worked!
Original thread: https://forums.imore.com/threads/did-you-know-ios-tips-tricks.247725/