If you are new to a workplace / team, and don't fully know your colleagues, please be very careful about judging someone negatively based on a few interactions. In fact, even if you think your negative assessment about someone is right, talk with other colleagues (about this person's personality and patterns of negative behaviour) to confirm it in case you are thinking of confronting them or complaining about them.
This doesn't feel like direct harassment but it was also pretty uncomfortable and awkward.
It may have been harassment. Or just someone having a bad day or someone with a quirky personality that said something inappropriate without meaning it. The reason you aren't sure is because you don't know this person well enough to judge him.
So, initially, perhaps you can give him the benefit of the doubt by considering various scenarios:
He is a bully / pervert who gets off on harassing his juniors.
He was trying to flirt casually with you by lightly making fun of you but it backfired. (The kind of flirting where you lightly put down someone, expecting a witty or light sarcasm back).
He was trying negging on you.
He lacks social skills and acted out nervously.
He was just trying to make small talk and joked, and it backfired.
As you can guess, depending on the intent of the person, your feelings will differ on this matter. In general, if you know this colleague well, either through observation or regular interactions with him, you can make a pretty good guess of his intent based on his personality or past behaviour with you and your other colleagues.
If you don't know him well, then start to find out - talk with other colleagues and diplomatically enquire about his personality and behaviour. In fact, this is a good practice to do so with everyone you work and a valuable skill to learn - the better you know somebody, the better you can work with them.
Now, come back to your own feelings.
Based on his possible intent, do you still feel your initial feelings are valid? (Note that I am not saying you were wrong to feel what you felt - at that moment you may have indeed felt uncomfortable and awkward, and that is fine and normal).
(If you assess that your feeling may have more self-internal roots, you may also explore why that particular subject made you feel uncomfortable. And consider if it is something you need to work on yourself to be more confident.)
Only after you are clear about his intent and feelings, and your own feelings on the matter, should you think about the next step:
- Ignore (if you were mistaken or opt to, for now).
- Confront (request a change of behaviour).
- Complain (protect yourself, be on the offence).
If you opt for 2 or 3, remember to be professional and assertive. But if you opt for the 3rd option, definitely make sure to create a list of pros and cons first, especially if you will be up against a senior person.
Some of the obvious cons:
HR is not your friend. They exist to protect and serve the company, not its employees. (The bigger the company, the more true this is).
You may be tagged as a "sensitive" or "difficult" person to work with, by both HR and / or some of your colleagues. This may affect your appraisals and working relations.
(Of course, you know your country's and company's culture best and thus are the most appropriate person to decide to what degree are the above cons applicable for your place of work.)
In case you decide not to complain, but still want the matter to be on record, do it diplomatically. One way of doing this is to send an email to HR, describing the incident and the person involved clearly but also making it clear that you are not complaining but seeking their advise on the matter and that it be kept confidential (BCC a copy to your personal email ID too). If you are lucky, you may get good advise too.
So yes, basically my advise is that unless your working professional relationship with someone becomes really strained (e.g. due to bullying or sexual harassment), treat the matter as an inter-personal issue and try to resolve it assertively yourself. Go to the HR only as a last resort.