What is the right way to write? The simple answer is: it depends. That really clarifies things, doesn't it?
There are basically two methods and then variations on them. The first is the logical method. Plot first, then write. The "plotter" does all the research, character studies, and outlines the entire story before ever beginning the actual writing.
Then, there is the "pantser"—the writer who writes by the seat of her (or his) pants. Another description of this method is "writing into the mist". Think about driving a car in the fog where you can only see as far as the reach of your headlights. You know the destination but can't quite see how to get there. This writer gets an idea and starts writing.
I'm a pantser. For me, the fun is in the journey, the discovery of unknown places. A story often presents itself as the first scene. I "see" it in my mind much like a movie. Characters reveal themselves as I write instead of me inventing them first. I do research on the fly. When I need to know something—a detail—I look it up. Most of the time, I'll jot a note to check a fact so as not to interrupt the flow. That is not to say I don't ever do research first. I'm always on the lookout for bits of information. I cut articles out of the newspaper or magazines that I might use someday. (You wouldn't believe how thick that file folder is.) Sometimes, an article itself will spark the story.
The plotter thinks pantsers waste time because often we write ourselves into a corner or hit a dead end and have to backtrack. Very true. I do a lot of back-and-forth writing—write a while, discover something new, go back and fix what I've written before. I try hard not to do that too much. It stops the forward momentum of the story. I'm trying to train myself to write a note on what needs fixing. Sometimes, I can't help myself and I have to go back.
I'm not saying pantsers don't plot. We just don't plot first, or the plot is sketchy at the beginning. My plotting comes as the story develops. Usually around chapter eight, I find myself floundering. I need to stop and figure out where I'm going and how to get there. I've either run into a dead end or the characters aren't cooperating and I need to know them better. The plotter would say "if you plotted first, you wouldn't hit that dead end." Probably true. To me, once I've plotted the whole story I've told it. I don't need to write it. Same with writing the dreaded synopsis. Okay, I've told the story. I'm done.
I've often wondered if you add up the time a plotter spends from the beginning of the outline, research, character study, or however s/he starts a story to the finished product and did the same for the pantser, the time would be about the same. We just go about writing our stories in different ways.
I know writers who write scenes out of sequence. Then, they figure out the order of scenes and write transitions. We linear thinkers have to begin at the beginning and write through to the end. There have been times, though, when a scene has popped into my mind that needs to go later in the story. When inspiration strikes, I figure I'd better take advantage of it. The muse may not return when I need that scene. So, I have—on occasion—written scenes out of order.
As you can see, there is no one right way to write. It's what works for the writer. You just need to start writing.