The evolution of the mass-metallicity relations from the VANDELS survey and the gaea semi-Analytic model