I’ve done both, though I have been typing mostly over the last couple of years.
There are those who feel that the act of writing by hand, while slower, can have benefits that typing doesn’t. Not sure I believe that, though I do believe that for some, hand writing is just the more enjoyable way to go.
For me, I write in Org Mode, which for this purpose is kind of like Markdown. I use Emacs on my computer, and an app called Plain Org on my phone.
I tried to do a bunch of small things. No single thing was the key.
There are probably more, but those are the kinds of habits we’re talking about.
Also important: if you don’t stick to all habits, don’t beat yourself up about it.
With the above, I was able to get from a high of 235 lbs down to around 180. I’m a bit more than that right now, but pretty close still.