The volume of a solid object or a liquid is a result of the volume of each of the particles that it is made of and their arrangement in space, that is, how they fit together.
However, the volume of a gas is due to the space that separates the particles that it is made of, which is large compared to the size of the particles (this size hardly contributes to the total volume).
It is easy to calculate the volumen of a parallelepiped like the one in the picture on the right. You only have to calculate the product of the three dimensions: length times width times height. When the object has an irregular shape, it is possible to measure its volume by immersing it in water and measuring the volume of the water displaced. The following visual will allow you to calculate the volumes of parallelepipeds.

Largo, ancho y alto