Observations of Neptune in the late 19th century led to a prediction that there was another planet, beyond Neptune, that was also affecting the orbit of Uranus. Pluto was discovered -- accidentally -- during the search for that predicted 9th planet.
It was later discovered that (a) Pluto isn't nearly massive enough to explain the observed perturbations, and (b) the observations were explained without the need for another planet when more accurate mass measurements were made.
(The hypothesized Planet Nine is too far away to have a significant effect on the orbits of Uranus and Neptune.)