Visibility range is a measure of the distance at which an object can be clearly discerned. Angular resolution is the ability of an optical system to resolve detail in the object.
Unlike the claim from flat-Earthers, there is no such thing as the “maximum range” of a camera. A germ on our hand is well within the visibility range, yet a regular camera lacks sufficient angular resolution to see it. On the other hand, an airplane is much farther away, but it has a larger angular size and can be seen by the camera.
Visibility range is an attribute of the medium between the object and the observer. It is affected by weather, smoke, air pollutions, sandstorms, etc. An object is not visible if the light from the object does not reach the observer in sufficient quality & quantity.
Angular size is an attribute of the optical device like an eye, camera, or telescope. It depends on the optical design and characteristics of the device. An object cannot be resolved if its angular size is smaller than the observer’s angular resolution.
Just because an object cannot be resolved using a camera, but the Moon is clearly seen, it does not mean the Moon is closer than the object. We can see the Moon because its angular size is much larger than our eyes’ angular resolution.
In an ideal condition, the visibility range in Earth’s atmosphere can reach 240 km (150 miles). It only applies when the entire line of sight is within Earth’s atmosphere. Looking upward at the Moon and the stars, on the other hand, there is effectively less than 20 km of an atmosphere that can diminish the quality of light, and light from the Moon & stars can reach us.
In space, there is practically no matter that can decrease the intensity & quality of light, so the light from stars can reach us. However, a star has too small angular size. A star cannot be resolved and will only appear as a point light source without any detail.