I’ve never really needed an “undo” button before but have this morning. Managed to paste over a whole paragraph I’d written and then couldn’t find any way to undo what I’d done - so had to retype the paragraph. I’m probably missing something.
On the computer, control-z at the same time. Recently the phone has also been offering an ‘undo’ button when I’ve deleted a section of text, but if you don’t see one then yours may not offer an undo option.