Everyone writes differently so there is no perfect, or even standard way to write. But, let me share one of the techniques I use. I write scenes.
Let me explain that a little bit. I could be walking along the street, reading the newspaper, drinking a cup of coffee or talking to a friend when something will trigger a scene. I tend to think in pictures, so as life unfolds, I visualize the consequences of things, often the path not taken. What if she had turned left instead of right? What if some terrible disease struck the planet and everyone started wearing plaid?
Once I visualize a scene, I type it up and file it away on my computer. The scenes don’t have to be complete. Sometimes they are simply partial ideas or settings. Agatha Christie kept a notebook in which she wrote memorable dialogue she overhead. When the time comes to write a novel or short story, I dip into the file, as Christie dipped into her notebook, and see whether any of the scenes fit the story line.
Sometimes scenes revolve around a question. For example, what if somebody solved a problem in an unexpected way? What if people didn’t want a problem solved because looking for the solution was so profitable?
After I got out of the Navy, I worked for a Washington consulting firm. One of the things I found was that your government was willing to spend billions studying a problem, but it was considered bad form to actually solve a problem. This theme comes up in two of the short stories posted on this website, Factory Town and Rain.