I want to calculate volume of a cube or sphere, how can I get that value
You can see the dimensions of cube or sphere when you edit them.
and then use classical formulas:
Volume of cuboid = length × width × height.
Volume of sphere = π × d3/6.
For more complex shapes you can use Monte Carlo volume estimation.
Hope that helps