Romance advice question

What can a man do to put a woman at ease without friendzoning himself into the “Nice Guy” role?

This woman is a complete stranger to him, or she could also be a woman who has developed several prejudices against him because various friends said that he was a loser, boring, etcera.

Another question: How is that possible that women give guys a chance to flirt with them even though they are not attracted to those men initially? In my experiences, if a woman isn’t attracted to me, she stays that way.

Thanks