While I'm no fan of our federal government, what this chart shows is that we are fundamentally a resource country and our economy is now fundamentally different from the US. Our GDP spikes when energy prices are high because productivity is much more a function of market prices than the actual skills of the workers. I'm not saying they are not skilled but that when prices rise 20%, the workers is not the source of that value, but rather the global supply/demand.
The US has become an energy powerhouse through fracking but also has some of the largest tech and biotech companies that make up an outsized amount of growth and investment. Their investment rates are high because those are the cutting edge companies that growth through R&D. Our largest components are stable companies like financials, energy and utilities, which don't require a lot of investments. There is no magic bullet for this and the US has many things we don't have, such as the scale of their market, the education sector, and relatively lax regulatory environment. It is difficult to match that for any country of our size that prioritizes more equality and more government services. If you look at Europe, Australia, and East Asia it's very much the same story. East Asia has an industrial edge due to high labour availability and lower wages but in a couple decades that will move to South Asia/Africa. Innovation is hard and even harder when you are located next to the most innovative country on the planet. If the US had our immigration policies, their growth would be even higher.
There are things we can do though, number one in my mind is to not fall into the Europe trap and over-regulate while providing minimal incentive for innovation. Europe is stifling their economy through over-regulation (like the usb type c connector on the new iPhones, which is not bad but just unnecessary for a gov to regulate), extensive carbon pricing and restrictions while there is no global consensus and agreement on carbon pricing schemes. There will be no meaningful reduction in global emissions, while jobs and companies just move away to go emit somewhere else.
Visualization of the rise of tech in the US