I know you said "grams to ml" but I thought it would be easier to use a teaspoon since every kitchen has one of those.
If you really need to know the volume in ml that is equivalent to 10 g of granulated sugar, you can Google that also.https://www.traditionaloven.com/culinar ... er-ml.html
It is 1.18 ml
However, the volume to weight relationship depends on how fine the sugar is. These calculations are for ordinary granulated table sugar, but if you used powdered or confectioner's sugar, the volume for 10 g would be less because the powdered sugar packs together more closely.