The total momentum of a system consisting of N interacting objects is constant in time or is conserved. A system must meet two requirements for its momentum to be conserved:
A system of objects that meets these two requirements is said to be a closed system (or an isolated system), and the total momentum of a closed system is conserved. All experimental evidence supports this statement: from the motions of galactic clusters to the quarks that make up the proton and the neutron, and at every scale in between. Note that there can be external forces acting on the system, but for the system's momentum to remain constant, these external forces must cancel so that the net external force is zero. For instance, billiard balls on a table all have a weight force acting on them, but the weights are balanced (canceled) by the normal forces, so there is no net force.
This text is adapted from Openstax, University Physics Volume 1, Section 9.3: Conservation of Linear Momentum.