People are not trained in how to get divorced or how to be a parent. We live in a changing world and there is no one right answer for what to do, such that many ways work and each situation is unique. The level of conflict is usually the biggest problem. Research has shown that a high level of conflict between the parents is more disruptive to children's development than whether their parents divorced. A high-conflict divorce is even worse.
Stability is a key factor for children of any age.
To the extent possible, parents should try to keep or create routines that the children can count on. Children need consistency on which to base their growth. Therefore, firm rules, regular activities, special time with the child, etc. are very helpful. Explain changes ahead of time, if possible. Children and adults adjust to change more easily if we can prepare first in our minds.