Few things on this one. If you ask someone “how do you identify?” they may not really understand what you’re asking so it’s important first to clarify (for yourself) what do you mean and then why are you asking that question?
If you’re asking someone “do you identify as a man or a woman” so that you can know how to refer to them (i.e. their pronouns) is better to ask, “what are your pronouns?” That’s the information you actually want to know (and often need to know) — so ask that instead.
If you’re asking someone what their sexual orientation is — consider why are you asking that. If you wanna know if they are into you ? Do you want to know so you can set them up with a friend and want to make sure they’d be into that? It’s helpful when asking personal questions to clarify (both to yourself and often to the person you’re asking) why you want to know. Rather than asking how they identify consider asking a more specific question and consider adding, “I’m asking because…” to the end to let them know why.