When does undo work in IOS Scrivener?

Hey, all. I’m up to 109k words on my WIP and sometimes undo just doesn’t work. I realize this isn’t Word with its infinite level of undos, but sometimes I’ll highlight text to edit, tap something wrong, and then a whole section will vanish. I’ve realized that the best way to solve this is to calm my racing heart and immediately tap Command Z on my Magic Keyboard, but is there a more specific list of when undo will work and when it won’t? I’ve run into issues where I can’t undo text I’ve lost…