According to NASA, we've discovered 3,453 exoplanets so far . With some of the farthest being at 13,000 light years away . This would suggest today scientists have a really advanced capability for this kind of discoveries. However, the existence of a ninth planet in the solar system (which has not only been proposed but its characteristics are already predicted with great precision) has not yet been discovered. If a ninth planet existed in our solar system, shouldn't it have already been discovered? How can exoplanets thousands of light years away be discovered weekly, while a giant planet right in our backyard still lays undiscovered?
There are two primary reasons Planet Nine (if it exists) is extremely hard to detect: it's very dim and its position is not well constrained.
Brightness - We are able to see planets in our solar system because they reflect light from the sun. The amount of light they reflect depends on how large the object is, how reflective it is, and (most importantly) the amount of sunlight that hits it. The hypothesized distance at which Planet Nine is orbiting is so far away that it will receive only a tiny amount of sunlight. At this distance, its apparent magnitude would be greater than 22. In comparison, Pluto's apparent magnitude is about 15. Magnitude is a logarithmic scale, so that means that Planet Nine would be $631$ times dimmer than Pluto, making it incredibly hard to see.
Unknown Position - The estimates of Planet Nine's characteristics are based on how it gravitationally disrupts the orbits of some trans-Neptunian objects. Based on these observations, scientists can calculate where it is likely to be, but these calculations depend on its size. Estimates of its mass range from 2 to 4 times the mass of the Earth. And all of these are just estimates, giving us a relatively large patch of sky to search to find Planet Nine.
Combining both of these reasons, it is very difficult to search for Planet Nine. We're looking for an incredibly dim object in a large area of the sky.
Now, when we look for exoplanets, things are actually a lot easier. To detect exoplanets we hardly ever look for the planets directly. We've only detected about 20 planets via direct imaging. Instead, we look at the light from the star. The stars are many orders of magnitude brighter than the planets, and are very easy to see. All we have to do is see how the light from the star changes over time. An early method detect shifts in the radial velocity of the star (its motion towards or away from us) using Doppler spectroscopy. The more prevalent method today, the one that the Kepler mission used, is transit photometry. We measure the light output of a star, and look for dips in its intensity, caused by the planet orbiting in front of the star and blocking some of the light.
Because we're looking at a star, we don't have the problems we have when looking for Planet Nine. Stars are very bright, their positions are known very accurately, and we don't have to wait too long to make a detection. Plus, surveys like Kepler are able to scan many, many stars at once.