It’s a balancing act to propel your story but also give characters the agency to surprise you (and your audience).
You may know where your story is going, but your characters can’t just skate to the conclusion.
That puzzle should stump you sometimes.⠀
The great Raymond Chandler used to write himself into corners that he couldn’t get out of... so he just kept the plot twisting so much that no one would notice.
Director John Huston had to call Chandler while making The Big Sleep to ask who killed the Chauffer.
Chandler didn’t even know - and he wrote the story!