Constraining dust formation in high-redshift young galaxies