Another anecdata point, I have ADHD. It affects memory in all sorts of known and measured ways. I generally find if I can get something into long-term memory then I'm set. Working memory is terrible. Physically writing while working serves as a crutch there too.
That said, I have never been able to take notes on a keyboard. I also find that physical notebooks not only are in practice much easier to search, but I also have the impression that the fact all your note pages physically still exist (and not "disappear" after you change pages) helps recollection.
As a side note, I feel mind mapping works differently on paper than with something like Xmind. Xmind is for organising and categorising thoughts by moving them around. Paper mind maps are for helping me remember the conversation when I wrote them; I can't seem to use software for that at all.
But computer notes are much easier to search. So for things like meeting minutes, and daily todos etc, write it in a .txt file. But when following along a deep learning course, write the equations and diagrams on paper. Later you can write code examples in your personal cheat sheet for easy retrieval.
Assuming search works, then I’d say a big advantage of pen and paper is being less constrained in the layout of your notes, and for example do diagrams. Big disadvantage is not being able to edit, for example restructure your notes by moving things around.
OneNote is not only a good notetaking capture tool, it's also a great clarifying tool for general reference/project support digital filing.
Whether the digital artifacts are text, handwritten doodles, embedded files like multimedia or WIP digital artifacts, screenshots of binary file hexdumps, the works can all be stored together with relevant context, all labelled and fitting into a 3-ring-binder skeuomorphism I'm used to from organizing projects back in school in the olden days.
Not the tool for everyone (especially those want to go fully Linux Desktop) but its very close to having something for everyone. Just gotta be able to do mobile and linux with local notebooks.
I was updating an insurance pricing application that had all sorts of formulas for capital requirements, profit load, minimum premium, etc. The formulas were often laid out in SQL but I ultimately wrote them step-by-step on paper to make sure I was truly following the logic (and order of ops). Worked well!