While coal was a major part of the electricity generation in Germany, it has been declining rapidly in recent years and is being phased out completely before 2038 which is roughly in line with the switch to EVs.
In the meantime renewables, especially wind have been growing rapidly and have accounted for more than 50% of all electricity generation in 2020. In 2021 Wind alone was nearly a quarter of the whole electricity production.