Neutrino-nucleus interactions: From nuclear dynamics to neutrino oscillations