In general, I prefer to write in a linear fashion from start to finish. Unless . . . .
Sometimes, if I'm cutting back and forth between two parallel plots (the away team on the planet and a concurrent crisis on the ship, for instance), I may decide to just stick with one set of characters and focus on them for the time being, rather than mentally switching gears every other scene. You don't want to lose momentum, especially if the away team scenes are going well and you're making steady progress on them.
Then you go back and do the shipboard scenes later . . . .
(I did this a lot with my DC Comics novelizations, which involved a zillion characters and subplots and settings. "Okay, today I'll do all the bits with Wonder Woman on Paradise Island, and put off all the outer-space scenes with Green Lantern until next week.")