Most of the time, I imagine them together in my mind, but any scenario is possible. I guess the main judge is what sounds more exciting - if the chord progression sounds exciting on its own, I might start from there and build the melody afterward.