And what I mean by that, "try focusing on understanding how it makes sense for her to be upset," is essentially a way of responding to a tantrum. If she is screaming about a limit you're holding, something you're saying No to or something she wanted that can't happen, instead of focusing on trying to stop her tantrum/screaming, recognize that she is working to adapt to an uncomfortable limit & that there are a lot of feelings of frustration involved. She is powerless, essentially has to rely on being understood & managing to convince an adult if she wants things to go her way. She made her point to you but things still didn't go her way! There's sadness with that, a feeling of loss & grief, and being angry is safer than feeling her powerlessness & helplessness, plus her grief, so fully. So she rages.
Keep her safe, keep yourself safe, but stay understanding. It's a process. They learn to handle emotions when WE handle them!