I suspect that there's a LOT goign on here so there won't be any immediate fixes.
The first thing I would say is that you are in a negative spiral. And as the adult, you are going to hvae to be the one to break it. So right now, she's unahppy, she lashes out, you are upset, you shout etc. That's not to say poor behaviour ris okay or should be excused, but that she's still young and it's up to you to create an environment in which she wants to behave well.
[Also, while I hate the autmatic ND labels, its worth considering - ADHD or ASD brains dont' respond to punishments or consequences like threatening to take their phone and a lot of this sounds like the sort of ADHD negative spiral DS got himself into at slightly younger - 12, rising 13].
Think about what you can say to be positive/happy/supportive. Not a big chat. Not a huge issue. Just a thing. Did she get a good mark on a test? Did she make her bed this morning? even just has she got dressed and is wearing her full school uniform on time, or has put together a nice outfit on the weekend. Compliment or thank her. Actively look for moments like this. Small moments. YOu dont' have to turn them into a whole thing and please don't expect her to be grateful.
It doesn' tmatter if there's still negative in between. But too often I think the negative becomes the default and you're angry/upset and so don't see or acknowlege any of the positive.
Then, what nice things can you do for her that are, again, minor. What' sher favourite meal - can you just get it in or cook it. No drama just, "Dinner's ready - it's your favourite pasta dish" or whatever.
Then you need to start addressing the bigger issues. I'd start with a meeting with the school. What's going on at school? how is her behaviour, academic performance etc. Do they have any insight into her friendship groups or social interactions? Do they have suggestions? What positive input can THEY provide at school - eg when DS was in his spiral, school helped by making a point to identify POSITIVE things, even if minor, as all he ever heard was negative feedback. Does she have a favourite teacher you could talk to, or an approachable form teacher who could run interference for her?
Wht can you put in place to incentivise her? A sit down chat, where you pick one thing you want to improve on, with an incentive - so perhaps it's how she behaves at home or perhaps it's about getting up and ready for school on time or whatever it is.
DS gets small monetary "bonuses" for good report cards. Consistently proving he can be trusted leads to him getting more independence.
He is very food orientated so I buy his favourites or make his favourites when I know he's had a tough day/week but for her it might be something different.
Is there something she's desperate to do or have that you can offer as an incentive? DS wanted to be able to take the train to go somewhere.... so we used that as an incentive - "prove you can be responsible, get yourself ready on time, be proactive, and we'll let you take the train which requires all of those things." And he did.
Say yes when you can. People get twitchy about this one as they think it's spoiling the child. But again, by now, all she ever hears is negative feedback. So when she asks if she can go out with her friends, if your instinct is to say no, stop and think "why? what is the real harm?" and instead say yes. DS was so used to no no no all the time that he was nervous to ask us if he could start a new sport. Similarly, while I loathe sleepovers, I make a point of saying yes almost every time if I can because it's an easy win in terms of me saying yes and not no.
The result was that over a few months, we saw significant improvements. I'm not naive enough to think the problems are solved. they flare and will flare. But the truly awful place we were in about a year ago has definitely gone away.