In the last two years, though, my current text file has gotten too unwieldy to use. I have to do a bunch of searching to get to sections (or remember their character-exact names). Then last week, I lost a day's research notes because Google Drive crashed and didn't sync until it was too late, overwriting my work. Clearly, I'd outgrown my setup.
This last Sunday, I researched note-taking apps that don't use proprietary formats or cloud storage: Obsidian? Foam? Dendron? Logseq? I went with Obsidian, which while closed-source, keeps everything in Markdown files, so I'll always be able to use them in the future. (Logseq's different approach also seemed promising, and it's open-source too; I'd recommend trying that too.) I set up Obsidian-git for reasonable syncing that wouldn't result my notes being overwritten by accident. It all took a few hours, not endless tinkering.
I've migrated a few note sections into it, done a few diagrams and code blocks. Works well. I think I'm set for the next 10 years.