It varies for me. When I'm working on a series, I have to take into consideration what's been done already and how the situation might stand for the new manuscript. With new stories that are not part of a series, it really depends.
In some instances, the character comes first in which I come up with a character and determine what would make the reader feel a bond with that character. I then come up with what that character wants to accomplish and determine what kind of obstacle is or becomes present. Then I let the story develop.
With some stories, a situation develops first. Then I populate it with characters and determine what their goals are. Sometimes, they're noble. Other times, they're just trying to survive.
In rare instances, the story and characterization unfolds based upon a device or invention that then places the character, often someone ordinary, into extraordinary circumstances where the character gets to show how an average person might react or succeed. By the way, by using an ordinary person with no science background the story then doesn't need a lot of explanation for futuristic inventions because the character just doesn't know and has to take much of what happens on faith. Also, the character doesn't have to be dumbed down for some events to happen. They can try things just to find out if they can do something and fail or end up in new situations that were unexpected.