Your Notes are kept locally on your Mac by the Notes programme from Apple

You may store notes locally and in the iCloud using Apple's Notes app.

MacOS creates a local duplicate of both kinds of notes and stores them for the Notes app to use.

You can do it locally on your Startup Disc if you ever need to locate these or if you need.

to retrieve the thumbnail photos for notes for some reason.

If you mistakenly deleted a note or wish to get a cached thumbnail from a long-gone note.

you may want to do this. If you wish to reinstall macOS or set up a new Mac.