In the context of the expanding universe, the Sun and other stars within our galaxy, the Milky Way, are subject to the overall motion of the galaxy itself, as well as the expansion of the universe on larger scales. Here are a few important points to consider:
Galactic motion: The Sun, along with the other stars in the Milky Way, orbits around the center of the galaxy. This motion is primarily influenced by the combined gravitational forces of all the matter within the galaxy, including stars, gas, dust, and dark matter. The specific trajectory and speed of the Sun's motion within the galaxy depend on its location and the gravitational interactions with neighboring stars and structures.
Local Group motion: The Milky Way is part of a small group of galaxies called the Local Group, which includes the Andromeda Galaxy, Triangulum Galaxy, and several smaller galaxies. The Local Group as a whole is also moving through space. The exact velocity and direction of this motion are influenced by the gravitational interactions among the galaxies within the Local Group.
Expanding universe: On larger scales, the universe is expanding, meaning that the space between galaxies is increasing over time. This expansion, described by the metric expansion of space, is a fundamental property of the universe. The expansion itself does not exert a noticeable effect on objects bound within galaxies, such as stars. The gravitational forces within galaxies are much stronger than the overall expansion at these scales.
Therefore, from the perspective of the Sun and other stars within our galaxy, the primary motion they experience is related to the gravitational interactions within the galaxy and the Local Group. While the universe is expanding, the motions induced by gravity dominate at smaller scales, and the effects of the expansion are primarily observed on cosmological scales, involving clusters of galaxies and beyond.