Win, earn, and gain all relate to getting something, but the meaning depends on how you get it. The difference is about luck, effort, or gradual change.
Use win when you get something by being the best in a competition or by chance (lottery, contest).
We say win something, but beat someone:
Use earn when you get something as a result of work, effort, or merit.
Use gain when something increases or develops slowly over time.
Gain often describes progress, not a single event.
Join 100,000 people who are improving their English skills on the Shaky English app