There are four steps of creativity and they work well, specifically for writers. These steps are: preparation, incubation, illumination, and implementation.
The preparation for you do for writing, will vary depending on what kind of writing you want to do. If you are writing a story or novel you might want to do research on your characters, your setting or your plot. Non-fiction and article writers will do research on their chosen topics.
Some writers though like to write without doing any research at all. They write a discovery draft that shows them what they need to research at a later point in the writing process.