I can notice if I don't get along with someone; how long it takes to notice depends on how subtly the other person expresses their discontent. Sometimes, I notice a clash between me and another person right away. They're the ones who insult me and make rude comments. On other occasions, I don't detect their disdain until much later, when their heightened frustration makes it more obvious. Yet in some cases, I would've never been aware of any conflict had someone else not informed me. It's the largest problem I've faced from not being able to read non-verbal cues.
To answer your second question, yes, it's possible to become more self-aware from experience. Sometimes, the other person's frustrations would make clear to me what I had been doing wrong all along. They'd complain that I kept bothering them with my obsessive interest. From there, I learned that people don't want to hear you drone on about your obsession. I'd also figure some out through observation, such as that when someone is bored, they'll give short answers. In other cases, I learned through applying rules and non-verbal signs I learned later to my experiences (?Oh, so that's why she was angry when I didn't say hello!?). I know that there will still be people I won't get along with, but I hope I'll be able to notice a clash before irritating someone for a while.
_________________
“Oh - You're a very bad man!
Oh, no my dear. I'm a very good man. I'm just a very bad Wizard.”
― L. Frank Baum, The Wonderful Wizard of Oz