I would recommend
https://standardnotes.org/ after trying all other (OneNote, Boostnote, QOwnNotes, etc.) note taking SWs. Encrypted linked storage (S3, Dropbox, ...) for files, encrypted notes, multiplatform, multiple editors (code, 2FA, markdown, spreadsheets, your own!, ...) & can be self hosted. Easy (also encrypted) backups. I only miss the diagrams tool (like draw.io) or handwriting (touch/pen) support.