1 pound of resources used to build a solar panel will provide power for years or decades. 1 pound of gasoline might provide power for 30 minutes.
Yes they both run out, but one will run out in the 21st century and the other will run out in the 210th century.