According to the law of conservation of linear momentum, the linear momentum of an object remains constant even after contact if no external force is applied. Newton's law of motion can be used to explain this law mathematically, and vice versa.
An isolated system with no outside force is where the elastic collision takes place. The linear momentum is conserved in this situation. If there is no external force acting on the two cars during the collision, their total beginning momentum is equal to their combined momentum.