It means if you are using SI units "The kilogram is defined by setting the Planck constant h to 6.62607015×10−34 J⋅s (J = kg⋅m2⋅s−2), given the definitions of the metre and the second."
and gram is some random word you made up, with no definition under SI.
The gram is indeed defined by SI to be 1/1000th of a kilogram, it's not a random word I made up.
There is no logical difference between the definition you gave, and an alternative definition that says "the gram is defined by setting the Planck constant h to 6.62607015×10−31 J⋅s (J = g⋅m2⋅s−2), given the definitions of the metre and the second", and then defining 1 kg = 1000 g. Which is why I'm asking what this distinction actually means, if anything.
It meant something that feels more real when the kilogram was defined as the mass of a physical reference kilogram object in a vault in Paris, but that changed a few years ago.
and gram is some random word you made up, with no definition under SI.
https://en.wikipedia.org/wiki/International_System_of_Units