If you prefer not to shake your iPhone, use the three-finger tap gesture within the Notes app to access the undo and redo options.