definition
 Volume: Amount of space occupied by a threedimensional object is called its volume.
 Capacity: Capacity means the ability of the hollow object to hold substance, i.e., solid, liquid, or gas. It is a measure, that ascertains the amount of space available in a container, that can be filled with matter.
notes
Volume:

The measure of this occupied space is called the Volume of the object.

The volume of an object is the measure of the space it occupies, and the capacity of an object is the volume of substance its interior can accommodate.

It is nothing but space, taken up by the substance which can be solid, liquid, or gas.

Hence, the unit of measurement of either of the two is a cubic unit.

Both solid and hollow objects have volume.
Capacity:

Capacity means the ability of the hollow object to hold substance, i.e., solid, liquid, or gas. It is a measure, that ascertains the amount of space available in a container, that can be filled with matter.

Measured in metric units such as liters, gallons, etc.

Only hollow objects have the capacity.

1 mL = 1 cm^{3},
1 L = 1000 cm^{3},
1 m^{3} = 1000000 cm^{3} = 1000 L.