Answer: The same way you write any novel, with an emphasis on the imagination! Every writer writes differently. All I can say is what works for me.
I spend a lot of time thinking, working out the general plot in my mind. Theme, characters, location, and plot. I keep at it until I get it right.
Then I start work on a synopsis — my version of an outline — that starts where the protagonists begin engaging with the problem at hand and ends when they subdue whatever needed subduing.
The thing is, that in the process of getting from beginning to end, everything changes. Characters don’t want to follow my plot line. Instead, they want to do their own thing. The location might or might not work. Often, the theme is the only thing that remains intact and sometimes even that changes.
Once I get those things worked out and put that synopsis into my computer, it still changes because I know my books should be between twenty and twenty-five chapters if I want the word count to end up where my publisher wants it, so that often means that my mental version won’t work and I must either add or subtract things.
Whichever it requires, it means changes and I’m usually amazed that the changes improve the story that I’d thought was perfect.
Then, when everything looks good — finally — I start writing.