On the opposite side of the Deus ex Machina, where the answer is dropped in from out of nowhere and entirely outside of the protagonist, there is the Chekhov’s Gun. This shares a lot in common with simple foreshadowing, but that would not quite be an accurate statement. If put into visual terms, foreshadowing would be something like positive space and Chekhov’s Gun would be the negative space. It is not the forwarding of any one thing, but rather the notation that anything within a scene should be there for a reason. If it isn’t necessary to move the story forward, it’s inclusion is distracting.
The original term came from a phrasing that if you introduce a gun in the first act, it should go off in a later act. That is a paraphrase on my part, but is roughly accurate. You don’t have to show any significance to the item in question when it shows up, as long as it proves important later. Sometimes it ties to the twist ending of a story and sometimes it just proves to be an unexpectedly useful presence that has been established long before.
This is also a reminder that we shouldn’t pad out our work with useless meandering. Don’t drone on about some topic if it doesn’t in any way apply to the story. If you read the unabridged version of The Princess Bride, you might recall a certain chapter that violates this rule entirely. Do not tell us every detail of something that has no significance to your story. It is distracting at best and annoying to the point of putting the book down at worst. A good editor will just cut this chaff out anyway, so don’t fool yourself into thinking it will pad your word count or have some value in the final work. It is a waste of your efforts and a disservice to the reader.