If the garage has no power connection, then you could
a) only charge the amount of electricity that comes from the garage roof,
b) only charge while the sun is shining, because otherwise there is no electricity at all.
This is madness cost-wise. You buy the photovoltaic system, you buy the wall box and get a few kWh charged on weekends (in the summer half-year also in the evenings, if you like). A garage roof is not large, hardly anything usable comes out of it.
Save your money, have a power connection installed and buy the electricity for charging. Dimensions cheaper and as a bonus, the garage door also opens without sun ;)