The difficulty in capturing detailed images of nearby planets compared to distant galaxies stems from several factors regarding the nature of observation, technology, and the physics of light.
Scale and Distance: When observing galaxies, even though they are billions of light years away, they are enormous, often spanning thousands or hundreds of thousands of light years. This means they can subtend a significant angle on the sky. Planets, while much closer, are minuscule in comparison, translating to tiny angular sizes when observed from Earth.
Resolution: Telescopes, whether from Earth or space-based, are constrained by their resolving power, which depends on their aperture size and the wavelength of light observed. Distant galaxies, with their large angular size, fall well within the resolution limits for detection. Nearby planets, though close, have small angular sizes, making them more challenging to resolve in detail.
Atmospheric Disturbance: Ground-based telescopic observations have to contend with Earth’s atmosphere, which distorts and blurs images (a phenomenon called ‘seeing’). Adaptive optics and space telescopes mitigate this issue to some extent, but capturing sharp images of nearby planets still requires overcoming this hurdle.
Brightness and Contrast: Planets within our solar system reflect sunlight, and when observed from Earth, proximity to the Sun introduces significant glare. Capturing detailed planet images means overcoming this glare, an easier task for distant galaxies set against the dark backdrop of space.
Intervening Spacecraft Limitations: While we have sent probes and orbiters to nearby planets to capture detailed imagery, the scale of space travel means these missions are rare and limited by resources, time, and technology.
Innovation and Technology: Observing galaxies is often a cumulative process where light gathering over time through long-exposure imaging enhances our view. This technique is less effective for planets that move quickly across the sky relative to distant stars and galaxies.

Technological advancements such as enhanced adaptive optics, larger telescopes (like the upcoming Extremely Large Telescope), and continued innovation in space telescopes (like Hubble and the James Webb Space Telescope) and spacecraft missions will gradually bridge the gap in capturing high-resolution images of nearby celestial objects.