Carbon dioxide (CO$_2$), a primary greenhouse gas, contributes to atmospheric heat retention, thereby causing the greenhouse effect. Methane (CH$_4$), water vapor (H$_2$O), and nitrous oxide (N$_2$O) are also notable greenhouse gases. Therefore, option (2) is the accurate choice.