sie: she or they
How would you know if 'sie' referred to her or to they in a sentence?
Sie with capital S can be also the formal you.
Imagine a flowchart.
Question 1. What is the verb conjugation?
1a, like sie hat -> it is she. Done.
1b, like sie haben -> go to question 2.
Question 2: Is it capitalized?
2a, Yes and it is not the first word of the sentence. -> formal you
2b, no. -> they
2c, yes, but it is the first word of the sentence. -> go to question 3.
Question 3: Is there any other clue here, a noun maybe?
3a, Sie sind eine Frau -> Formal you, singular.
3b, Sie sind Frauen -> Formal plural you, or they
3c no clue. -> Formal you or they
Watch the verb for instance... Sie ist is she, Sie sind is they. There are other ways but this one is what came to mind first.