As a writer, you learn something from every draft of every story you write. The trick is remembering that lesson for the next time that situation arises. Otherwise, you find yourself having to re-learn the lesson again. And again. A good trick to avoid this is always write from the character's state of knowledge, not your own.
What am I talking about? Let me give you a [non-spoilery] example. In my latest ep of Doctors, one of the regulars investigates a medical mystery. They find a key piece of evidence mid-way through the script, which ultimately leads to them resolving the mystery. So far, so good - and it all worked fine as a scene by scene.
But when I started writing actual script drafts, I forgot that my protagonist didn't know who or what was causing the medical mystery. So when they found the first clue, I was writing them as if they'd seen the end of the story and thus already knew who or what was causing the medical mystery. A case of the protagonist who knew too much.
It's vital to keep a clear, conscious distinction between what you as the writer know [hopefully, everything] and what your characters knew at any given point in a narrative. You have total knowledge, they only know what they have already seen, heard or inferred. It's a tricky distinction to maintain, but ultimately crucial.
Took me a couple of drafts [and helpful notes from the production team] before I diagnosed what was going wrong. That led to some careful unpicking and reworking of the plot to reinstate the character's correct level of knowledge. That had a ripple effect on events, but the end result was worth all the hard work required.
A related thought I always try to keep in mind: everyone is the hero of their own life story. Everyone of us is pursuing their own quest to be get ahead, get rich, get laid, get happy, get better, etc. So should it be with every character in every story you write. Each character should be chasing their own goals, their own agenda.
Nobody wants to be the sidekick, the supporting character. That means all characters have their own unique attitude to events and the world. And that attitude should be evident in all their scenes, all their actions. They might help the hero, but only if it aids their own agenda and goals [or they've been coerced into helping].
When I'm writing the first draft of any scene now, the first thing I have to decide is from whose point of view am I writing it? What are they striving to achieve? Then I interrogate every other character in the scene to figure out their attitude to that goal. Will they help or hinder - and why do they feel that way?
Nailing my characters' individual attitudes - and state of knowledge - is crucial. Once I know that, I find it easier to write their dialogue, to know what subtext is hidden beneath their words. Agendas, attitudes, knowledge - all add richness and depth to characterisation, in my humble opinion. Your mileage may vary. Onwards!