What SI prefixes actually change
An SI prefix changes only the scale attached to a base or derived unit. It does not change the physical dimension. A millimetre, metre, and kilometre are all lengths; a milligram, gram, and kilogram are all masses on different decimal steps.
That is why prefix conversion is fundamentally a powers-of-ten problem. Once the underlying quantity is expressed in the base scale, every other prefix is just another decimal shift on the same measurement.