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.
But Syncthing Fork is not shut down and is still maintained (never used the main version tbh).
https://github.com/Catfriend1/syncthing-android-fdroid
https://f-droid.org/packages/com.github.catfriend1.syncthingandroid/