Actually the distance you can see on Earth and Mars is less than you'd think if you are just at ground level as the astronauts were on the Moon. Even on the beach, normally you look at it from several meters up - and can see ships which are partly below the horizon. And on the Moon, a little further than you might think - is nothing in the picture to really give scale.
The formula is
where d is distance to horizon from your eyes, h is your height, R is the planet or moon's diameter.
This page is good: How far can you see? which calculates that for Earth, it's 4.66 km, Mars, 3.4 km, and Moon, 2.43 km. Of course this depends on what you plug in for the height.
That article has this photo, helps compare the horizons:
And there is a distance to the horizon on-line calculator here, though you need to plug in the gravity of the planet as well, for the Moon, use
But go up a hill of say 100 meters, and the distance to the horizon jumps up to 18.64 km. You can also see more distant mountains.
Here are a few photographs where you can see the horizon is more than a few hundred meters away, and with some more distant mountains.
The sky of course is black because there is no air to scatter light from the sun to our eyes.
And no stars because the contrast is too great, the astronauts would not be able to see them either, except there is one photograph with Venus visible, they might see it when the sun is hidden behind something - but their eyes are dazzled by the surface just as your eyes are dazzled at night for a few seconds if you walk out of a brightly lit room into the night.
And cameras also have the same issue, you have to adjust the exposure for the landscape, and when you do that, the much fainter stars are not visible.
Similarly Venus is sometimes visible to the naked eye in the day time sky near to the sun even at midday. You need to block out the sun behind a building or some such, and know where to look and when to look, and you can see it easily enough. However, probably most people have never seen Venus at midday.