Europe´s biggest economy shrank by 4.9% in 2020 as restrictions to curb the pandemic hit many sectors.