It’s different for everyone. For me, I don’t like it when strangers ask so I don’t ask when I’m the one who is curious. If it’s friends or someone getting to know me, it doesn’t matter how it’s asked. I do not mind. If I’m handing you a beer and say " that’ll be x dollars." And you respond by asking where I’m from, it bothers me. It’s the difference between getting to know someone and trying to fit them in a box. I get that sometimes people are curious but not every curiosity has to be satisfied. When I tell them that I’m from US it’s common to be followed by “fine! Where are your parents from?” That’s just weird. I’d never approach a stranger and ask about their parents.