I have a couple of Volkswagens, a 2014 Beetle and a 2021 GTI. The 2014 has a diesel engine, and the 2021 has a gasoline engine, but both are actually solar powered.
Let me explain.
Both the cars have internal combustion engines which derive their energy from the combustion of hydrocarbons with oxygen. Those hydrocarbons are so-called fossil fuels derived from petroleum. The petroleum was created over time by the compression and heating of organic matter buried in the ground, and that organic matter came from the remains of living organisms, plants and animals, which lived a long time ago.
The brontosauri that filled my cars’ fuel tanks survived by eating vegetable matter that lived by synthesizing organic molecules from the environment, and that synthesis required energy. That energy came from sunlight.
So there you have it. The energy to operate my Volkswagens came to Earth as photons from the Sun. So did the energy from fossil fuel fired power plants used to charge my neighbor’s Tesla.