A lot of it is just speaking up. Be willing to say “Dude, that’s not cool.” If you see a guy harassing a woman, speak up. If you end up involved in a conversation with men where they disparage women, express your disagreement. Don’t be silent. Be understanding that even if you aren’t ‘that guy’ but a woman is wary of your offers of assistance or whatever, that she isn’t judging you as an individual and don’t take it personally. Just say something like “that’s cool, I understand” - maybe offer to call someone for help for her (like, if appropriate, a tow truck).