Toward attosecond control of electron dynamics in two-dimensional materials