To summarize the answers: Everything that works for you is the "good way" to do it.
But this:
In my case, the main story was written before I even started the game.
Is the most important point.
You don't necessarily need to have all the story written down to the last detail, but you need to know all the key points and possible outcome. Too many games end abandoned, or with a rushed ending, simply because the author reached a point where he don't know how to continue his story. And the only way to
avoid this is to know the whole story first.
Having an answer to those four questions is more than recommended:
- What is the MC final goal?
- Why the MC want to achieve this goal, or have to achieve it?
- How the story will end?
- What will be the all intermediary step that the MC will have to pass before he reach his goal?
Ideally, those four points should also regard each one of the character playing a role in the story.
Then you put all this together into a coherent story line. Something like:
- The MC starts to notice weird things
- The MC investigate them
- The MC encounter X
Here come the first branching. Either:
- The MC investigate on X, believing that she's responsible
- The MC confront X
- The MC learn that X is also investigating
- X don't trust the MC as is reluctant to collaborate
or:
- The MC ignore X
- X notice the MC
- X investigate on the MC, believing that he's responsible
- X confront the MC
- X don't believe that he's just investigating
Then it fallback on a common route, with slightly difference on the writing depending what path have been followed:
- The MC understand that he have to earn X trust
- The MC learn that X have [whatever] issue
- The MC works on solving X's issue
- The MC earn X's trust
and so on.
That way, you'll never be really stuck. You can temporarily not know how to write the next scene, but you'll always know what is the next step that you need to reach. Therefore, you'll at least know what the next scene need to looks like, what will seriously help.