You can undo recent changes then redo them if you want them back.
Do one of the following:
Undo the last action: Tap Undo on the left side of the toolbar. Tap multiple times to undo all your recent actions.
Redo the last action: Touch and hold Undo, then tap Redo. Tap Redo multiple times to redo all your recent actions.
You can also shake your device, then tap Undo or Redo. If you can’t undo an action by shaking, be sure that you finished the action by tapping Done or by closing an open menu.
If you want to get rid of the changes you made to a spreadsheet since you opened it, see View, copy, and restore an earlier version of a spreadsheet.