The answer to this question is really going to be up to your writing style and your writing process, regardless of all the great advice that has been offered already
Some writers literally can't start writing a book until they have the outline done, the world completely built, characters designed, and chapters planned. These writers are affectionately referred to as the Planners, and there is absolutely nothing wrong with that. This can be a great way to have consistency and completed plot points and progression before you ever write a draft. It might take away from some spontaneity though, and the ability to evolve the plot and story as its written, depending on how rigid the planning is.
Other writers like to write first and then go back and world build later. They get the creative bug and need to write the entire first draft before they construct any character profiles or solidify their world-building. This could be considered intuitive writing because they just follow the creative flow rather than have any idea where they want the story to go. Eventually, world-building, character creation, and planning will have to get done, or there could be major plot holes and inconsistencies throughout the story.
Then, there is the halfway point, a type of writing I have heard referred to by George R. R. Martin and Brandon Sanderson as "gardening" writing. This is where a writer plans and writes at the same time, kind of going back and forth between world building, character creation, and actively writing the story as needed. That seems to be in line with what a few of the other respondents have said.
You might not know what your process is, and maybe you won't until you do start writing. I find that I have an even weirder writing process where I start with intuitive writing, but I inevitably hit a point where world-building has to take place (usually around 70k-100k words or so). Then, while I'm world-building, planning, etc. I start to encounter changes I want to make to the story, plot, and characters I've already written. So, before I can progress, I have to go back and make the necessary changes. My method is a bit chaotic, but it allows me to write, plan/world build and make changes in the story as well as to my world-building as needed.
It is true that writing will help inform your world-building, but world-building can also help inform your writing. Just because you do put something in an outline or character profile doesn't mean it can't be changed later, or evolve along with your story. Use the method or style that works for you, or pick and choose parts of each that resonate with you. Good luck with your writing!