To find the volume of the prism we just multiply all the measures

The volume is 24 cm³
If the sugar cubes have 1 cm³ of volume, to find how much sugar cubes fit in the box we must divide the volume of the box by the volume of the sugar cubes

Therefore we can fit 24 sugar cubes