Capacity refers to the quantity that a container holds.
The hollow objects are filled with air or liquid that takes a container's shape.
The total volume of air and water that is accumulated inside a container is the capacity of that container.
We can still distinguish between volume and capacity even after many similarities.
When dealing with capacity, more concentration is on how much solid, liquid or gas can fit into the container and it also implies the bearing power of that container.