I believe I cought an eye sty from a friend who visited me 1 month ago. What can I do?

Uncatchable directly. Maybe you both have dry eyes or blepharitis, but a plugged meibomian gland is rarely a catchable phenomena. It's not like a disease. You both may have similar habits of using the computer a lot, staring more than blinking, or not using warm compresses in the morning and night to decompress it. But it's easily remedied. Just change habits, and you both will see a difference in watching them disappear.