We make a similar guess for the stuff that is in the center of Earth. We measure local gravity and speed of sound velocity, and we guess here is liquid, here is solid, here is this rock, here is this another rock [1]. See for example https://www.livescience.com/64943-nobody-understands-the-gia... nobody has seen them, we guess they are there.
Dark matter is another guess. We guess there is more matter in galaxies than what the telescopes show. We can compare the amount of mater guessed from galaxy rotation with other measurements. In this case they compare it with the gravity between a few galaxies.
Nobody is happy that we don't know what dark mater is. There are a few theories, but none of them has enough experimental support. More lack of confirmed details in https://en.wikipedia.org/wiki/Dark_matter#Composition
[1] I don't know enough about rocks https://xkcd.com/2501/
Dark matter is not another Guess. is no guess at all. its the same as saying the center of the earth is made of Dark Core. and when someone proposed liquid core, there would be papers how a liquid core doesnt explain 100 %, and neither does rock or solid so Dark Core it is because it's sIMpLer to have just one Dark Something than 3 different somethings to explain anything.
The fact that there are tentatives to identify what it might be does not ammegliorate the fact that at it's core (pun intented) Dark matter is something to make equations fit without any other thought behind it or whether there might be several things behind it or god forbid that we juddge the equations themselves. I mean we got relativity because of a minor discord with newtonian Laws. (the orbit of Mercury). just a tiny percentage of obeservable behaviour at that time but it was a different time. a time where you could bring down the existing science of the day for a tiny percentage and now we accept 90% observation disaccordance (dark energy+dark matter) with what the equation require.