Documentation Is a Culture, Not a Task
Often one of the last steps of a major project is "Write Documentation". This is necessary, but certainly not sufficient for any remotely complex project. Documentation is important. People not involved in the implementation need to understand the system. People who already understand forget or move on.
But documentation naturally decays. It always needs to be kept in sync with the reality of the system. The only way this happens is by developing a culture on your team that prioritizes updating documentation as part of the work. It's easy to let this slip because it takes time to do and work can feel "done" without it. But if good documentation is important to your team, you need to find a way to make it part of the process. Maybe this is through code reviews or a CI check or someone on the team that just gets on everybody's case if they don't do it until everybody does it naturally. Whatever it is, it has to become part of what your team values or you will never get the full value of your documentation.