There are a few open source alternatives that let you store your notes locally.
In no particular order,
1. QOwnNotes - https://github.com/pbek/QOwnNotes
2. Joplin - https://github.com/laurent22/joplin
3. Zim Desktop Wiki - https://github.com/jaap-karssenberg/zim-desktop-wiki
Boostnote was pretty good as well, but it seems like after the change in leadership, there has been some issues.