If you're in a sketch attachment, it will also specify the type of stroke ( Pen, Marker, Pencil, or Eraser). Just shake your iPhone, and tap "Undo" on the Undo Stroke prompt for in-line sketches. Of course, you can use the same shake-to-undo method found with the rest of Notes (and iOS) if you prefer. Repeat as many times as necessary to get back to your desired edit. Simply give your iPhone a quick flick, tap "Undo" when prompted, and your last recorded text (which could be longer than just one word or character) will be undone. Let's say you made a typo in your writing, but you don't want to hit backspace to fix it. If shaking does not work, open your Settings app, then navigate to General –> Accessibility –> Shake to Undo, and make sure the slider is toggled on. Tap "Undo," and your actions will be reversed. After a moment, a popup will appear titled Undo Typing.
You don't need to shake it much - just give it a quick flick. It may sound silly, but in iOS, the way of undoing things when there is no undo button present is to shake your iPhone. Instead, you need to do something a little less obvious - shake your iPhone.
No one would blame you if you didn't know how to perform either action since there is no visible undo button for text or deletions in the Notes app. Undoing something you wrote or added involves the same process as undoing something you deleted. Undo Written Text, Added Pics, Accidental Deletions, Etc.