IT can get pretty complicated. When the volume of the head is provided it probably would be the volume that you would have if you bolted the head to a flat plate and then filled it with water through the spark plug hole. There may be an additional volume that must be factored in if the piston does not come to the very top of the clyinder or if the piston top is not flat.
The displacement is the bore times the stroke, which on a 125 cc might be something like 124.5 cc.
The compression ratio is the volume at bottom dead center divided by volume at top dead center. The volume at the bottom will be the displacement plus the head volume plus some unknown, while the volume at top will be the head volume plus the unknown.
So, the equation will look something like this: compression ratio = (124.5cc + HeadVolume + Unknown) / (HeadVolume + Unknown).
If you knew the compression ratio was 12:1, and the volume of the stock head was 7cc, then the equation becomes 12 = (124.5cc + 7cc + X) / (7cc + X)
Solving for X , X = 4.3 CC
Now, if you swap out the 7cc head for a 5 cc head the equation becomes
CR= (124.5cc + 5cc + 4.3cc) / (5cc + 4.3cc)
CR = 14.4 : 1
High octane race gas, for sure!
Note that all that was based on guesses for the actual stock compression ratio and stock head volume.
Rod