How do you prevent the readers or viewers from guessing the whole plot when you use foreshadowing? I remember watching Monster.Inc when I was young and I was able to guess the whole plot of the movie half-way through when the little girl laughed and shut down the whole electric grid. I didn't guess every little detail, but I was able to guess what was going to happen in the end and everything in between the end and that scene. How do you prevent that from happening when you foreshadow things, and is it a bad thing?
Just keep your foreshadowing subtle or indirect.
It is subtle when characters use phrases or sayings that are commonly used, for example. "That woman will be the death of me, Richard."
Because it is commonly used, the audience doesn't take such common idioms literally.
The same thing is true for common mistakes that in the shown situation, have no major consequences, but in a future situation does have a major consequence. Just make them a little indirect.
Richard screeches to halt. "What?"
You just ran a red light, you idiot! Pay attention to what you are doing!
Richard looks confused, then irritated. "It's two o'clock in the morning, nobody's out here anyway."
He starts up again, looking in the rear view mirror.
This can be indirect foreshadowing for a future critical mistake -- that has nothing to do with a red light, but everything to do with Richard being distracted and not paying attention to what he is doing. Maybe he makes a stupid mistake in the middle of the night, and kills somebody.
Or, in one of my stories, there is a pair of spies, male and female, that literally grew up together. They are couple and the guy is in love with the girl. He gets killed, because he broke protocol to save her -- and did not need to, she was not in real danger. I found two places to foreshadow this in earlier scenes, where he couldn't help himself, acted against training to protect her from harm. In both cases there was no major consequences other than her scolding him, but then forgiving him. His intentions were good!
But the third time he does this, on a critical mission, he gets himself killed.
His over-protectiveness (and failure to trust his partner to be able to take care of herself when surprised) created an unforced error that was a major failure in the plan, and it almost did get her killed, and she lost the love of her life in the bargain, and a months long plan was trashed over what could have been just a hiccup.
It was the "All is Lost" moment in the story, foreshadowed by a seemingly minor weakness in his character. Since when is "backup" not a good thing? When it betrays a larger plot to the enemy so they can mobilize, seek out spies and traitors and nullify any advantage of a surprise surgical attack.
To me, the best foreshadowing grows out of the aspects of our character's personality. Then it is believable -- yeah, she would do that!
And in the payoff, the thing that happens harkens back to the foreshadowed scenes.
Remember that a shadow has no detail. It is just a shape. Your foreshadowing should not be too explicit; it should just be similar in shape to what will become a pivotal moment.
As a discovery writer I do not plot ahead of time; so in order to foreshadow something, I often go back and look for good places to do that by modifying an existing scene; to establish the shape of the personality trait that will eventually lead to a turning a point.
To run with the Monsters Inc example, there are two things I would do to make the foreshadowing more subtle.
Misdirection on the power grid.
Add extra Distractions.
I would set scene by making the electric grid unstable even without any children present - make wires spark, lights dim, etc. for no discernible reason. It's just part of the worldbuilding that the power grid here does that.
Then I'd tone down the incident with the laughing child, and do it a couple of times. Have the kid laugh, and then you get a power dip, but it's just like a normal power issue, so it doesn't stand out. Do that often enough to establish a pattern, but not too often.
Then I'd use some distractions to make the pattern less obvious. Have the kid laugh, then the lights dim, then something completely unrelated and very interesting happens.
Readers understand that scenes have purposes. So if nothing happens in a scene except that the baby laughed and the lights dim, they will figure out that the point of that scene was to show that specific interaction. But if the baby laughs, the lights dim, and then some important plot point happens then the reader will assume that the plot point is the purpose of the scene, and that the laughing baby was just fluff.
Unless it's for a children's movie, foreshadowing works best if it's subtle, it's blended into other action, and you do it a couple of times.