How do I get back a note I deleted?

Open Trash in the sidebar on the home screen. Notes and folders you delete are kept there until you remove them. Tap … on a note and choose Restore to put it back, or Delete Permanently to remove it for good. Empty Trash removes everything in it.

Notes deleted from the Files app show up in Trash too, and can be restored for as long as iOS keeps them, which is 30 days.