Most writing classes suggest using note cards (paper or electronic) that can be changed and arranged as knowledge of the subject grows.
Personally, I think that’s a lot of work.
I only do enough research before starting to get a feel for the subject and as I write I do specific research about what I need to know to write the scene I’m working on and, yes, sometimes I must go back and revise a passage or two to conform with what I just learned.
That rewriting involves a tiny bit of time and work compared to what I’d have done if I’d researched everything I thought possible before starting the book.
It’s often said jokingly — though I’m not sure it’s truly a joke — that most of a writer’s research is ignored when writing a story because it turns out to be unnecessary and irrelevant.
So in the end research is a tossup:
Do enough research before writing to learn a complete subject.
Or stop during the writing process to learn what you need to know to write a specific scene.
Whichever way you choose will decide when you’ll have done enough research to start writing.