Its always better to document what you are going to build first before starting to code.
- You don't need to think what you need to build first then what and what next, when you have a proper workflow and prioritized modules.
- You don't need to worry that this can be done in a better way, or the another approach to solve this problem will work better .. When you have a fixed architecture and approach decided for the problem.
- You can track your progress more accurately, as you have already decided the complexity of modules and can see the work remaining when you have everything documented properly.
They are many other benefits of documenting and designing a solution on paper before hitting the code editors.