Which statement best explains how atmospheric gases affect earths average temperature

Atmospheric gases, such as carbon dioxide and methane, act as a greenhouse effect by trapping heat from the sun and preventing it from escaping back into space. This causes the Earth's average temperature to increase, resulting in global warming and climate change.