How to avoid unwanted female attention at work?

Hello,

My (31F) male coworker (35M) started job at the same time as me and we have kind of become friends as we followed the same onboarding journey together. He is an intern and hopes to get a job here after his internship.

He has an issue he asked me to help him with, but I don't have the answer myself; so Reddit - please help.

My coworker gets a lot of female attention at work, also while he is working (he is quite good looking). Not only does it disrupt his work, but he feels uncomfortable with the attention too, since it sends a signal that he is not too serious about his job. How can he politely reject small-talking to the females coming over to him?

Any advice on how he can approach this in a professional matter?

Thank you!