When it comes to writing, there are two main ways of doing it – pantsing vs plotting. Each is a perfectly viable method, depending on the person involved. What works for one doesn’t work for another.
Pantsing (or seat-of-your-pants writing) is when a writer has little to no idea of the plot of the story and just sits down and writes, seeing where the story and characters takes them. At the other end of the scale is plotting, where often detailed notes are made before the story has even started, mapping every aspect of it out. You can even do a bit of both, to varying degrees.
For examples of plotting there are these two images.
That is the plotting done for Catch 22 by Joseph Heller.
That one is for The Order of the Phoenix by JK Rowlings.
I’ve tried out both styles. Tears of the Mountain was done by plotting – I still have all the noted pinned to a corkboard. The rest have mostly come by pantsing, with some elements of plotting. I may make a few rough notes, but in general, the story goes where it will.