Few years ago I got excited about taking notes this way. I tried many different programs and came to the conlusion that Obsidian works the best. Problem is that it is a proprietary software, so I would never use it with connection to the internet. Best would be to install the flatpack on Linux and take away network permissions with Flatseal.
Later I discovered Logseq and switched to it. I liked it at first, but it turned out that the desktop app had a terrible performance. Takes for ever to start, and uses CPU for no reason. Bad for laptop on a battery. Another issue is that they have some weirdness in the markdown formating and strange folder structure. This makes it a pain to port the notes into another editor later.
small tip: Syncthing works well for synchronization of notes between devices, no matter which editor you end up using.
These days I use a text editor in the terminal. But even more than that I use mind maps. A cute program called Minder on Linux is my favorite. Majority of my notes are in a mind map structure. The graphical visualization helps me to orient and remember.