The teacher's action would undermine: Intrinsic motivation
Intrinsic motivation refers to the motivation that caused by internal rewards, such as the desire to succeed or personal principles.
Giving Gold Star is a form of external rewards and this tends to overshadow the intrinsic motivation that people have to achieve something.