The energy demand of national economies is increasing, with a substantial portion driven by non-renewable energy (NRE) sources. Increased consumption of NRE causes an increase in carbon dioxide (CO2) emission rates. Therefore, climate change is one of the serious issues worldwide. On the other hand, renewable energy (RE) sources are the best alternative clean energy sources to NRE sources. After leaving NRE, is it possible to deal with global warming by only using RE? To find an answer to the question, we investigated the long and short-term impact on the CE of the energy preferences of the analyzed. Therefore, we analysed the causality relationship between the rates of CO2 emissions (CE), use of RE and NRE sources, along with economic growth (EG) rates of various countries. The G-20 countries consume the most FF worldwide, and 19 of these nations were responsible for an average of 73.8% of the increase in global CE from 1966 to 2020. The G-20 countries were considered during 1966–2020 using the fully modified ordinary least square and dynamic ordinary least square methods. Additionally, the existence of cointegration between variables was examined by Pedroni, Johansen Multivariate Co-integration and Kao tests. According to the cointegration test results, in the long term, a 1% increase in the use of fossil fuels (FF) caused an increase in CE rates between 0.40% and 0.57%, whereas a 1% increase in the use of RE sources contributed to a 0.03% decrease in CE. Moreover, a 1% increase in EG caused an increase in CE rates ranging from 0.10 to 0.14%. According to the panel causality test, it is clear that RE sources alone are not sufficient to deal with climate change in the short term. Therefore, in addition to reducing the use of FF to zero, the protection and development of natural carbon sinks such as forests, oceans, and soils are mandatory to control climate change in the short and long term.