Not necessarily at all
Having the same volume means that these 2 objects occupy the same amount of space but it does not at all mean that these 2 objects have to be of an equal amount of mass
An example to simplify it is how you can fill a box with 100 little balls but it will require you millions of sand particles to fill the same box
In both cases the volume of the box which the 2 objects occupy is the same but the amount of basic units so to speak is different for sure
This simplification goes further in depth when looking at the atomic infrastructure of matter, objects like those of yours in the question
A Mole of whatever the matter may be, however, has the same amount of mass and this is due to the fact that the Mole is related to the definite Avogadro's number, number of units in one mole of any substance (defined as its molecular weight in grams), equal to 6.022140857 × 10²³.