One of those most important things to do when conceiving of a story is figuring out what sort of world the story takes place in. Much like characters, your story should only be able to take place in that particular world. But besides that, the world needs to be a living organism separate from your character. While the story should be unique to both, both are also unique to one another.
See, your character is the center of the story, not the center of the world of the story. Things should not happen solely because the character needs them to happen. The focus shouldn’t be on one character. Good world-building alludes to other characters, other events, other machinations that make your characters struggle more worthwhile. No one lives in a bubble and no one is omnipresent so your main character shouldn’t be, either.
That’s not to say it’s ok to let the world interfere with the characters at random (unless, of course, that is built into the fabric of the story to begin with). The texture of the world is there for just that – texture. In the climax of the story to have your protagonist get hit by a car because a man he was in no way connected to was drunk because his wife left him because she found out he was cheating on her with his coworker who bla bla bla is cheating. It may be true to the world – sometimes shit like that happens – but it’s not true to the story. And the story is what is important. If it is important to the story for something like that to happen then that too needs to be built into the world.
Which is a confusing way to say the world needs rules that tie in with your theme and/or story in order to be believable. If your character gets hit by a car in the climax then the world needs to allow for that sort of randomness to take place in order for the audience to not feel cheated or misled. If your character is an engineer on a spacecraft who has to fend off an alien attack when everyone else is killed, and the story is about his redemption in the eyes of his daughter, then the world needs to allow for an engineer to save the human race from a force he doesn’t understand. Some sort of telegraphed deus ex machima. A skill that we know he has but isn’t obvious that helps him defeat the threat. A weakness that the aliens have that can be exploited in the right way.
The way I view screenplays, or any story for that matter, is in layers. You can choose your own baked-goods-based analogy if you like. But each layer of the story should be built on and tie into the previous layers. That, to me, is the best way to build a story from the ground up. The world is the same idea.