Dashboard is a bad place for 2 reasons:
- the windshield reduces UV which is the most energetic form of light, so your solar panel would be slower. Solar panels are best outdoors.
- the vehicle in sun will build up heat, usually hotter than outside, and solar panels behave slower when hot.
You then pick up on the issue of being proximate with your phone:
- if you had the solar panel in a car then the phone in the car, the phone would get hot too.
So solar+phone is best outdoors where you place the solar panel in the sun, facing it squarely, then you get about 10W usually, and a sufficiently long cable and shade for the phone. So say the panel propped and the phone resting in shade on the cooler shaded ground.
If you are in a car, then the car's 12V recharges your phone.
If you are indoors, then the 110V/240V of the wall socket charges your phone.
Solar is when away from cars, away from building, outdoors, so think backpacking, hiking, camping, sort of thing. Good when the power is out at home, you place solar panel in garden / outdoors and recharge something.
A buffer battery is common, so solar charges battery, say you left it outdoors for hours, then you use that battery to recharge your phone. You lose energy via the buffer but gain possibly more total sunshine for a net gain.