Nearly all of the energy available on Earth comes from our sun, including all fossil fuels, shallow geothermal, biomass, hydro, tidal, wave, wind and solar energies. The remainder came from other suns, such as nuclear and deep geothermal.
Deep/shallow geothermal (and hydro, tidal, wave, wind, solar) have those pesky borders and politics to deal with when looking to harness them. One country can't arbitrarily go to some other country and harness their geothermal, erect solar panels or wind turbines, etc.
The parent posters were, extremely obviously, not having a discussion on where various energy sources originated from in a science sense, but the politics surrounding the trade of those resources.
Sure you could. Just place it next to the output of a solar press and extract oil from sunflower seeds or others, let it pour into the barrel until full, replace with an empty barrel, and repeat. When you have enough oil stocked, you can use it to manipulate the market, make a fortune, start a war, takeover the world, eliminate borders, whatever you like, the sky's the limit with an empty barrel and a little sun.
If it could truly be done anywhere it would still be happening in the US.
However, you can't just extract energy from somewhere that doesn't have it. No matter how much money you want to sink into it. If there's no oil/NG/whatever, that's that. Trillions of dollars wont make it appear there. Trillions of dollars does let you setup a nice supply chain and labor force in the US though.
Building airpods is an industrial process. All value add. You can do it anywhere, one factories are set up, workers trained etc.