Rep. Ro Khanna, a Democrat, represents Silicon Valley and serves on the House Armed Services Committee.

Donald Trump recently called Jimmy Carter to ask for advice. Carter, who normalized relations with China during his presidency, told Trump that China has not fought a single conflict since 1979, while America stayed at war. Both presidents were concerned China is “getting ahead of us.”

While China avoided foreign conflicts and invested in infrastructure, green energy and artificial intelligence, the U.S. deployed troops to dozens of countries. Over the past 15 years, America spent nearly $6 trillion fighting wars in the Middle East and Asia while reducing federal research and development spending to the lowest level since 1955.

China is already the world’s largest economy in terms of purchasing power parity and is turning this economic power into military might. American democracy defeated Nazism and Soviet communism, but we now face a new rival: authoritarian capitalism.

We should be concerned with the Chinese company Huawei’s capability to spy, China’s social credit system, militarization of the South China Sea, global predatory loans, intellectual property theft, Confucius Institutes around the world, discriminatory facial recognition surveillance and most alarming, the systematic internment of over a million Uighurs in detention camps. Without instigating another Cold War, America must ensure China does not win the 21st century and export its model of government globally.

Trump understands the challenge, but his response is misguided. We need a major reorienting of our priorities, not a trade war that hurts the supply chains of our manufacturers and does nothing for our leadership in the critical industries of the future. Trump is also focused on ballooning Pentagon spending, expanding the war on terror and slashing research and development funding. Instead of cutting funding to the National Science Foundation as he proposed, he should double it. The trillions spent on wars and tax cuts for the wealthy and corporations should instead be invested in advanced scientific, military, medical and technological research, such as artificial intelligence and quantum computing.

Infrastructure is another avenue for bipartisan attention. A potential $2 trillion proposal is encouraging, but we have a lot of catching up to do. Our fastest train takes over 22 hours to travel from New York to Chicago. In China, traveling similar distances takes 4.5 hours. While the U.S. has less than 500 miles of high-speed rail, China has over 19,000. We need to build a high-speed rail system, invest in our airports and highway system, and revitalize downtowns in rural America.

Broadband must also be part of our infrastructure conversation. The $45 billion spent yearly in Afghanistan could pay for affordable and universal high-speed internet across America. China is investing $22 billion in rural broadband and aiming for 98 percent internet access for villages by 2020. Universal internet access is how we ensure the next Apples and Googles are built in America. Who knows, the next Steve Jobs might be in rural Kentucky, but she may not yet have access to the internet.

In addition to internet access, Americans must have tech skills to attain 21st century jobs. China recently built 1,800 Confucius schools, 123 of them in rural areas, and graduates almost eight times more STEM (science, technology, engineering and mathematics) students than the U.S. To reverse course, we should adapt Abraham Lincoln’s Land Grant College Act for the 21st century. We should provide community colleges and land-grant universities billions of dollars to create tech institutes across America that can provide apprenticeships and credentialing.

The U.S. must also not let China win the green energy race. China is already beating us on electric vehicles. Last year, China was responsible for 60 percent of global electric vehicle sales and production. We must massively expand the electric vehicle (EV) tax credit, making it fully refundable at the time of purchase, and assemble EVs here in America to spark a manufacturing boom.

Lastly, America’s tradition of welcoming immigrants gives us an advantage over Chinese insularity. As Condoleezza Rice recently told me, we should want the most brilliant Chinese students creating jobs in America. We should staple green cards to our international STEM graduates’ diplomas. Taxpayers spend approximately 70 billion dollars in higher education each year. Why turn away brilliant minds who benefit from this investment and want to build their companies in America? Some of the world’s largest companies, many of them in my district, were founded by immigrants who came to America.

We have a lot going for us with our entrepreneurial culture, commitment to the rule of law and support for human liberty. But we must be more strategic. By avoiding costly wars, mobilizing investments in cutting edge science and technology in collaboration with private sector leaders, and having a rational immigration policy, we can ensure an American 21st century.