If you want 20 ppm of CO2 in your water you have to diffuse 20 ppm of CO2 into the water, and keep it up at a rate that replaces the CO2 used by the plants, and lost from the water surface to the air. It makes no difference how much GH or KH you have.
If you want to try to measure how much CO2 is in the water you can measure the KH and the pH of the water and those charts will give you a number which will most likely be much higher than the amount of CO2 you actually have in the water. This is because the charts don't work at all accurately with typical aquarium water.
Raising the KH will also raise the pH, even if you only have the 3 ppm that we typically get from the CO2 in the room air. Changing the GH will do nothing except raise the GH.
Buffering is done by a mix of a weak acid and the conjugate base of that acid - meaning the chemical formula for the conjugate base is the same as that for the acid, but minus one hydrogen atom, making it an ion in the water. If you mix CO2 in water a small portion of the CO2 forms carbonic acid in the water, and the conjugate base for carbonic acid is the carbonate ion. So, a mix of a carbonate, like sodium bicarbonate, which becomes a mix of carbonate ions, plus some anions, and carbonic acid, which forms from CO2 in the water, is a buffer. That buffer holds the pH constant at a value that depends on the amount of carbonates in the water (KH) and the amount of dissolved CO2 in the water. It buffers the water against changes in pH that would be caused by other weak acids or bases in the water.