To be sure, this is a matter of personal preference. At the same time, I replied:
There’s a lot a writer can do to set up a twist in order to make it as big a surprise as possible.
And on the other hand, foreshadowing can be used to increase the power of an event in your story when that event finally arrives.
What’s your preference? Do you like to make up the story as you go, or work backwards?