My way of handling this has several steps. First, for the ones that are clearly not meant as anything except a joke and which you do not personally find upsetting, laugh out loud. Make a self-deprecating joke if you can. This is important as a first step because then when you object to certain other phrases, people are not going to be afraid to talk in front of you.
The next step could be to make a mild joke back at them that is exactly as insulting to their maleness as what they said is to your femaleness. They comment on your bust size, you comment on their "small hands". Do it with a smile and if they say anything respond with, "It was just a joke, can't you take a joke?"
Or just make a statement that will remind them that you are a woman and that what they are saying might not be appropriate without coming straight out and telling them to shut up. I came across my team speculating on my bra size once and they didn't know I had entered the room. So the first thing they heard from me was "You are all wrong." and then I smiled at them and walked into my office without another word. Nobody got punished, nobody got reported to HR. Nobody brought up the topic in my hearing again either. Use this technique only for stuff you find mildly annoying or as a first step towards getting them to stop the bad stuff if you want to be nice enough to give them a chance to get the point before you fire back stronger.
For the really egregious stuff, hit back hard. Someone meows at me, I would say something like, "We are trying to adult here, can you take that out to the playground?" It helps to accompany this with a disgusted stare and then look away from them and return to the original conversation immediately as if they are so childish that it isn't even worth your time to wait for their reaction. Someone makes a joke about "no means no" and I look at them very seriously and say in a very flat tone of voice, "I was raped and I don't find that very funny." Of course I can pull this off more easily because I was raped so it takes no acting skill at all. The idea is to make them feel as uncomfortable about what they said as you do. And for them to realize that you will stand up for yourself when they go over the line.
What you don't do is let it slide for one person that you like but not for another that you don't like. (Exception is that you can let it slide for people significantly higher in the work hierarchy than you are, everybody understands that confronting the CEO in public may not be a good choice.) People get uncomfortable when they can't figure out where you will draw the line specifically for them. Yes I know that people you are flirting with seem less upsetting when they make sexist jokes, but trust me, if you let it slide for the guy you want to date and not the creepy guy you don't want to date, it will backfire on you.
I have also seen some particularly religious women be able to tell people gently that something offended them and would they please not do that in front of them and have it work because they were well-known to be a fundamentalist Christian (or other religion, but it is Fundamentalist Christian women I have seen be able to pull this off.) before the objection. Again, this doesn't work if you only object to some people and not others. In this case, I have observed that the more quietly they asked that the behavior not happen around them, the more people took it seriously as a religious objection and complied.
Another thing that tends to be ineffective and career-harming is to complain to HR. It is far better to handle it yourself with humor and little push back.
Every single woman I have known at work has been harassed. It comes with the territory unfortunately. The ones able to get past that and succeed had thicker skins, a sense of humor, and were able to to turn the really bad stuff off without formally complaining. The ones who complained to HR tended to get escalations of the bad behavior or found that no one wanted to work with them or had people actively try to sabotage them.