Wearing makeup itself doesn't cause a stye but if you share makeup with someone that has a stye then the makeup could transfer the bacterial infection from that persons eye to your own eye.
So yes it's possible to get a stye wearing makeup from someone who has had a stye but you won't get a stye just from wearing makeup.
If you do have a stye and have used makeup on that eye you should throw that makeup out to prevent getting infected with a new stye.
Also never share makeup with anyone who has had a stye.
A stye should go away within a few days to a week but you can apply a warm compress or warm wash cloth to the eye to help it go away sooner and make it feel better.