Cubic meters are a unit of volume, and kilograms are a unit of mass. Cubic meters can only be converted to kilograms if the density of a substance is known. If density is known, then multiplying the number of cubic meters by the density (kg/m^3) derives the number of kilograms.
Density must be measured in kg/m^3 in order to convert the number of cubic meters to kilograms through simple multiplication. A substance with a higher density has more kilograms in a certain number of cubic meters than another substance with a lower density but equal volume.
For example, Engineering Toolbox reports that the density of iron is 7850 kg/m^3. If there are 10 cubic meters of iron, this represents (10 m^3 * 7850 kg/m^3), which equals 78500 kg. Liquid water, on the other hand, has a density of just 1000 kg/m^3 at 4 degrees Celsius. If there are 10 cubic meters of water, this represents a mass of (10 m^3 * 1000 kg/m^3), which equals 10000 kg water, a much smaller mass than that of iron in the same amount of volume.