The pros and cons of this choice are already covered in other answers from an objective perspective but I think it's important to consider the subjective assessment as well.
Ultimately, the best solution is the one you find most comfortable.
When I was young computers were a rarity; those who learned to type did so on mechanical typewriters, which is very different to touch typing. Being interested in computers meant I spent more time around them than most, but I never learned to type on them when programming. I found that for most of the things you wanted to do back then the 'hunt & peck' two fingered typing approach was just fine.
Back then when I wrote, hand writing was far more comfortable because it was faster for me, and therefore I didn't lose my train of thought so often. Remember here, that the average person can think at around 300 to 400 words per minute (WPM) but can only speak at around 120 to 150 WPM, and often type at between 40 and 100 WPM depending on skill. Hand writing is the slowest at no more than 20 WPM for the average person.
So for me it came down to speed. I could write faster than I could type, so I wrote. That meant it was easier for me to keep up with the story in my head through writing than it was to type.
But then I went to work, and ended up in a role where I was writing reports, briefs, guides, and many other forms of documentation. So, I taught myself to type. That was 30 years ago, and I don't even think about typing now. I'd say that I'd be close to 80 WPM in touch typing so that means for most of the writing I do, I do it on a computer because now that's the fastest way to get words down and it means that it's even less likely again that I'll lose my train of thought.
So over time, I changed preference but I did so because of the speed at which I get things down. Ultimately, to me that's the deciding factor. We can all think faster than we can transcribe, whether by typing, writing or speaking. It's up to our personal experiences which of these we can do faster than the other but to me, that's going to be the deciding factor as the closer we are to our thinking speed, the more likely we'll keep our train of thought.
For the record, I still write with a pen, and often. But I do so more for the joy of writing than for any serious recording of a story or article. When writing for work or fun, speed is a factor and the editability of the output when typing is an added bonus. There is still something tactile that I love about marking a paper with ink from a fountain or inkwell pen that you'll never get from a keyboard, but I have to say that my productivity went through the roof after I taught myself to type.