She may be punishing you.
If what she perceives is that you are deciding on arbitrary rules and punishing her if she breaks them then it is quite possible she has decided to punish you if you upset her.
The best way to break that cycle is to have a conversation along the lines of
(Eg she wants to use her phone after school, you want her homework done).
You: DD, I think that now is a good time to have a conversation about homework and phone use. As your parents we want to make sure that your homework gets done every night, because it's important for your future that you do well in school. What do you think is working well about the way things are at the moment?
(This gives her chance to say positive things if there are any)
Then ask her what changes she would make.
Then, and this is the key bit, whatever she suggests, trial it for a week. If it doesn't work and she doesn't do the homework, she'll get detention. She won't fall massively behind in a week.
Check in with her each day - what homework have you got? Do you need any help?
Then at the end of the week, review the situation with her.
If she's been on her phone constantly and not done any homework then you can say that it isn't working and suggest for example she can use her phone until dinner time and then it goes in a box and she does homework,
If she is doing her homework - no problem!