We usually do not see the planet itself
A star can be millions or billions of times brighter than a planet orbiting it. Instead of simply taking a photograph, astronomers often measure the tiny effects a planet produces: a small dip in starlight, a gravitational tug on the star, or a subtle distortion of background light.