I've used Joplin before which was okay-ish (but borked the e2e encryption during an update).
Now I would recommend Silverbullet if you are really keen on self hosting a notes app.
But the notes that work best for me is simply Obsidian + Syncthing-Fork (you could self host a syncthing server), thanks to its sheer ability to adapt to nearly any use case thanks to its plugin.