The expansion of the universe refers to the fact that, on large scales, the distances between galaxies are increasing over time. However, the expansion of the universe does not directly affect the smaller-scale structures within a galaxy, such as our solar system. This is because the gravitational forces within a galaxy, including our own, are strong enough to counteract the overall expansion on smaller scales.
In our solar system, the Sun's gravity dominates the dynamics, holding the planets in relatively stable orbits. The gravitational forces between the Sun and the planets are much stronger than the effects of the universe's expansion at these distances. As a result, the space between the planets in our solar system remains relatively constant.
It's important to note that the expansion of the universe primarily becomes significant at much larger scales, involving the vast distances between galaxies. On these scales, the cumulative effect of the expansion leads to the stretching of space itself and the increasing distances between galaxies. However, the gravitational forces within bound systems, such as galaxies and their components, are strong enough to overcome the expansion at smaller scales, maintaining the stability of those systems.
So while the universe as a whole is expanding, the gravitational forces within our solar system and other similar systems dominate, keeping the relative positions and distances of planets relatively constant over time.