Greenhouse gases trap heat and thus warm the Earth because they prevent a significant portion of infrared radiation from escaping into space.
Greenhouse gases have no effect on raising the temperature of the Earth.