Over the years, I've tried all sorts of different approaches and tools for this, and some have worked better than others.
At this moment, I use four tools. On the desktop, I use a basic text editor for all of those. When I'm not at my desktop, I use an Android app called LectureNotes.
I use git to archive my notes, etc.
I also run my own Wiki, where I consolidate the current notes for every project I do (mostly to make it easy for future me to refresh myself when I need to change something on a project I did 10 years ago, and to make it easy to share the notes with others in a comprehensive way).
At this moment, I use four tools. On the desktop, I use a basic text editor for all of those. When I'm not at my desktop, I use an Android app called LectureNotes.
I use git to archive my notes, etc.
I also run my own Wiki, where I consolidate the current notes for every project I do (mostly to make it easy for future me to refresh myself when I need to change something on a project I did 10 years ago, and to make it easy to share the notes with others in a comprehensive way).