Density is given by #rho=m/V#
So, rearranging for #m#, we get
#m=rho*V#
So, the mass of a substance is its density multiplied by its volume.
Note that the density and volume can change depending on the temperature and pressure, according to gas laws.