On the other hand, if you don't know what's coming up next, your characters, and ultimately your readers, might not be able to figure it out---and suspense and tension will be preserved.
The challenge is that not all of your world-building details will be apparent before you start drafting your story. You may get part way through the story and realize there are missing gaps in your plan or your outline.
Drafting a story is an organic process and there is no hard, fast rule for every author, OR for every story. You have to do what works best for you. My suggestion is that if you are stopping every few lines to try and puzzle out how your world works, then you need to spend some time crafting the detail. If you can write, unimpeded, for hours without stopping then it probably is fine to proceed with storytelling.
When I first began writing my story, I decided to begin with the basic elements. I knew that spirituality would be a factor in the final story, so I began with the mythos of the Creation for my world. From there, the social structure - a caste system - evolved. I crafted political alliances based on the social structure, and mapped the geography. Now I'm three years down the road and I've tossed out some of what I built, and there are huge chunks of the worldbuilding story that will never make it into the actual story.
But none of this was wasted effort, because I thoroughly UNDERSTAND the political and social system, and thus the motivation for the characters. It has made (some of) the writing a breeze in many ways.
I suggest you write backstory as long as you want to. Keep an ongoing file, and know you will be adding to it over time. When the story is ripe for beginning, you'll know... you'll have that itch to get on with it. Don't fret overmuch about which phase you are in. Just write. It's all good, and all serves your purpose.
The trouble with overplanning is that you can lose interest in the project. The problem with underplanning is that you may get stuck. Writer's block (defined as having a project but not knowing how to keep it going) is usually brought on by underplanning.
I just finished a rough draft for a novel that I scarcely planned at all. I had a character, a setting, and an idea for an ending. Then I let her have some fun. It was actually a blast to write. Now, I'm going to have to rewrite it, but that's typical.
Do whatever feels right to you. You may be wrong, but you'll learn better on the next project.
Imagine your book were an episode of "Full House." Nobody wants to read Bob Sagat. Be more like Uncle Jessie.
I agree with Christine. You have to try different things to find what works for you.
For the record, so far I'm more on the side of 'planning is good' than 'spontaneity is good'. But I have a sort of theory. I could be wrong. My theory is that planning is almost always better near the beginning of your career, before you've internalized your own writing process. Once you have conquered this thing called 'novel-writing' maybe you'll be able to wing the next one and have good results. Maybe not.
There are far too many individual personality quirks and methods for me to definitively say 'this is so' about any particular method of writing.
Experimentation in lots of different types of writing methods is a good thing. Have fun.
I find planning helps me get to the finished product quicker. It certainly doesn't eliminate editing, but it moves a lot of it up front, while you're dealing with a much smaller document. Of course, you'll still miss stuff and have to add and delete scenes because a novel is an organic thing but it certainly reduces that.
As for the level of detail (which I think was your actual question) the first time I planned I tried to capture the emotional tone and outcome of every action, to jot down key phrases I though would be cool, etc, etc. The result was a long hard slog. The second time round I kept it very loose with minimal details and had a shed-load more fun.
I like to think of writing as finding my way between nodes (odd metaphor I know but that's how my brain works). I personally need at least two before I can start writing: the beginning and the end. Personally, I write better if I have more nodes to navigate between - places I know the story has to hit, but I can still improvise as I find my way between them. But there is an optimum number of these nodes and when I have more than that it stops being a journey of discovery and starts becoming more like a guided tour, which is not what I want from my writing. The trick is to find what your optimum number is.