How to open NoteStore.sqlite
I've extra registered on this website to share this answer, because I have been trying to get my notes back for a month. Now I have them back and I am so happy and gratefull that somebody took their time to share their answer, so I will do the same in case somebody needs it here later.
These are the steps, from another Apple forum:

Quit the Notes app.

Back up to iCloud all of the notes previously stored on your Mac, and turn syncing off. You may want to create PDF backups of anything you don't want to risk losing.

Restore these three files, located in ~/Library/Group Containers/group.com.apple.notes/, from a backup to your desktop:

NoteStore.sqlite
NoteStore.sqlite-shm
NoteStore.sqlite-wal


Drag the three files from your desktop to ~/Library/Group Containers/group.com.apple.notes/ on your Mac and agree to replace all three files.

Launch the Notes app and check your notes. Hopefully, they will be there.