This change in spending in response to a change in wealth is called the wealth effect.
When your earnings increase your spending also changes.
The wealth effect refers to the phenomenon where people become wealthier as their friends do.