I like Obsidian, here's a post showcasing what it is capable of https://mathisgauthey.github.io/my-complete-obsidian-workflow-to-manage-my-life/ - sadly its not open source; have it in Flatseal to restrict files & system access and use portmaster to restrict net traffic of plugins. Logseq is also very good and is open source, but would still restrict in the same way. Zettlr is the best simple & functional open source note taker. If you're an Emacs lover then org-roam works but requires a lot of tinkering (as with everything else in Emacs!). On mobile Zettel notes will read these same markdown notes and you can sync them with a git repo, or use Nextcloud (eg self hosted on Ubuntu with Cloudron).
Discussion
Realised I'm posting in fossdroid and listed a lot of desktop apps above 😅, Zettel notes is really great and the developer is responsive on Telegram to bug/feature requests.