The greenhouse effect contains two different components: the natural greenhouse effect, and the enhanced greenhouse effect that results from human activities and is the cause of global warming.
Water vapour is the most plentiful greenhouse gas and is mainly responsible for the natural greenhouse effect that maintains the world at a comfortable temperature suitable for human existence. Carbon dioxide also plays an important part in this natural greenhouse effect.
Carbon dioxide is mainly responsible for the enhanced greenhouse effect. In this case, water vapour plays only a minor part as an enhancer, because the atmospheric concentration of it will increase if the temperature rises for otherreasons, then causing a further increase in temperatures.