This is an example of "observational learning."
Observational learning refers to a learning that happens through watching the conduct of others. It is a type of social realizing which takes different structures, in light of different procedures. In people, this type of learning appears to not require support to happen, but rather, requires a social model, for example, a parent, kin, companion, or instructor with environment. Especially in adolescence, a model is somebody of power or higher status in an environment.