Do you know there’s a difference between “stay” and “live”?
To “stay” in a place is to live in it temporarily, whereas to “live” somewhere is more permanent.
1) Your friend could be going to New York for a holiday.
You can ask him, “Where are you staying in New York?” instead of “Where are you living in New York?”
2) You want to ask for the address of your classmate.
You can ask “Where do you live in Singapore?” because that’s his permanent residence.