It's called "catcalling". Most of the time, catcalling victims are women and men mostly do that because it's tolerated in your society. However, you can do something about it. Report it on the police station, if ever there is a law already in your country that protects catcalling victims because in my country there is already. If there's none, try to talk to the person who catcalled you and ask what is his problem. I know this is kind of take a risk option but try to be brave. In that way, you can also protect other women by not tolerating that kind of personality.
In addition, I know you're doubting yourself if you're beautiful. You're beautiful, other people's opinions about you are not your problem anymore. Embrace yourself and in that way, people can no longer hurt you with their opinions about your body.