I recently went through a process researching a good FOSS alternative to Notion as I use it daily but also hate how locked down it is.
I ended up choosing Logseq though it didn't quite have all the features I use (like databases). But I found a number of good candidates: Athens, TiddlyRoam, Zettlr, Simple note, Joplin.
I had a real focus on bidirectional linking and the concept of the Zettlekasten method as I feel that idea works well with how I think but even outside of that there's a number of great options.
Found a number of options that are not yet quite ready for prime time as it were, the most promising one I found was Affine which is a collaborative system that allows for linear block-based notes (like Notion) that can also be viewed as a kanban board (on arbitrary fields for grouping) and a whiteboard (like miro).