"Because we know how gravitation works, we can calculate how much matter needs to be present in various structures — individual galaxies, in pairs of interacting galaxies, within clusters of galaxies, distributed throughout the cosmic web, etc. — to explain the properties we observe."
Imagine that you were writing this sentence in 1900; you easily could have. And then you went on to describe the search for some kind of weird undetectable matter that would explain the orbit of Mercury.
We don't know how gravity works. Our best model of gravity's effects, General Relatively, is silent on the mechanism that matter uses to bend space-time. Our best model of how matter works the Standard Model of quantum mechanics, predicts (kinda) but can't seem to produce a gravitational mechanism that matches the predictions of General Relativity.
GR's predictions of how matter affects spacetime are so accurate that to the degree of precision we are capable of measuring those predictions agree with the theory. Ditto for the Standard Model.
We cannot see any effects attributable to dark matter on anything other than galactic scales. The resolution of the Pioneer Anamoly required eliminating every possible effect that might impact Pioneer 10's trajectory; and in the end the anomaly turned out to be due to solar radiation. Had there any been any dark matter operating on Pioneer 10 within the solar system it would have shown up in that analysis and it did not.
Modern astrophysics has a problem. And the problem starts with asserting "Because we know how gravitation works, we can calculate how much matter needs to be present in various structures"