According to the text, how much renewable energy is produced and consumed in the United States

Context: Since 2019, wind power has been the largest producer of renewable electricity in the country. Wind power generated 337.9 terawatt-hours of electricity in 2020, which accounted for 8.4% of the nation's total electricity generation and 43.2% of the total renewable electricity generation. By October 2021, the United States nameplate generating capacity for wind power was 129,256 megawatts. Texas remained firmly established as the leader in wind power deployment, followed by Iowa and Oklahoma as of year end 2020.

Hydroelectric power is the second-largest producer of renewable electricity in the country, generating around 7.3% of the nation's total electricity in 2020 as well as 36.4% of the total renewable electricity generation. The United States is the fourth largest producer of hydroelectricity in the world after China, Canada and Brazil.

Solar power provides a growing share of electricity in the country, with over 50 GW of installed capacity generating about 1.3% of the country's total electricity supply in 2017, up from 0.9% the previous year. As of 2016, more than 260,000 people worked in the solar industry and 43 states deployed net metering, where energy utilities bought back excess power generated by solar arrays. Large photovoltaic power plants in the United States include Mount Signal Solar and Solar Star. Since the United States pioneered solar thermal power technology in the 1980s with Solar One, several more such power stations have been built. The largest of these solar thermal power stations are the Ivanpah Solar Power Facility, southwest of Las Vegas, and the SEGS group of plants in the Mojave Desert, with a total generating capacity of 354 MW.

According to preliminary data from the US Energy Information Administration, renewable energy accounted for about 12.6% of total primary energy consumption and about 19.8% of the domestically produced electricity in the United States in 2020.

Answer: In 2020, tenewable energy accounted for about 12.6% of total primary energy consumption and about 19.8% of the domestically produced electricity in the United States.