According to this question, we must know that everything related to grams, means a mass of something.
So, we cannot use grams (g) or kilograms (kg) as a unit of volume.
For volume, we use liters (L), milliliters (mL), and cm^3 as we see on the written question. Also, we have plenty of units for volume in different systems used to measure.
Answer: milliliters (mL) or centimeters cubic (cm^3)