First Notes stopped syncing with iCloud, then all my Notes on my Mac disappeared
I've used Notes for years across both iPhone and Mac (I have over 4,000 Notes). Recently I realised that my Notes from my Mac (which is my primary device for note-taking) were not syncing to my iPhone.I checked using iCloud on the web and it gave the same results as on my iPhone - Notes stopped syncing from my Mac about 1 month ago. I then noticed that Notes on my Mac was using 10-15% CPU without doing anything obvious, and quitting-restarting Notes didn't help.
So, I unchecked iCloud sync for my Notes on Mac, then re-started Notes. Now all my Notes have disappeared i.e. Notes on the Mac can't see a local copy of my Notes. I've looked in the Library folder and can see a Notes database folder containing 470MB, which feels about right. But Notes can't seem to access that folder any more - it just shows 1 note on my Mac.
How can I retrieve my lost Notes?
MacBook Pro 16″, macOS 13.5