Here is an explanation to understand step by step how to do this.
A volume can be determined for any three-dimensional object using formulas that are unique to that item's shape. For instance, the volume of a water bottle indicates how much water it can hold. Understanding an object's volume is crucial since it indicates how much stuff that shape can carry.
Any form or object's volume is directly inversely proportional to the volume of water it displaces when submerged in water because of its link to density. As a result, there are two ways to determine an object's volume: by mathematically calculating it using the formula unique to that shape, or by submerging it in water and measuring the volumetric displacement of the water.