What is the biggest myth about outer space? That there is no gravity in space. People do not have a good understanding of what weightlessness is. They see astronauts floating around inside and outside a spacecraft and reach the conclusion that there is no gravity.
Anywhere mass and space exist, gravity exists. Gravity is the curvature of spacetime due to the presence of mass. The gravitational influence from the Sun that keeps the Earth in orbit around the Sun is felt equally by the astronauts in space. The gravitational influence from the Earth that keeps the Moon and the ISS in Earth orbit is also felt by the astronauts floating inside and outside the spacecraft. If these influences were not felt, the astronauts would not stay in orbit.
At the altitude the astronauts in the ISS inhabit, the gravitational influence from the Earth is 8.75 m/s^2. That is only about 11% less than the 9.81 m/s^2 felt by you and me, on the Earth’s surface.
They are weightless and appear to float because they are in freefall. A spacecraft in Earth orbit is falling towards the Earth (because of gravity) but also moving forward at a speed high enough that the path traveled isn’t straight down, but instead a curve that circles the Earth. The astronaut is falling and so is their spacecraft. If both are falling, there is no force of one against the other and thus no sensation of weight. We can emulate this freefall here on Earth, in a tall chamber that is pumped to vacuum.