Memory is key in capturing COVID-19 epidemiological dynamics