You should not be upset about this, nor in tears. This is not anything personal towards you. Assuming there are no behavioural or learning difficulties, and that there is not a back history causing this, then it can be put down to nothing more than a child pushing boundaries. Children push boundaries all the time, it's totally normal. And you can't get upset every time they get this way. Your job as a parent is to stay calm, and deal with it appropriately.
When my daughter was that age, if she acted up, I had to do nothing but point out of the room, and say 'ROOM' in loud and angry tones with a cross face, and she'd be gone like a shot. And I'd leave her there for a while (no electronic devices), then either she'd come & apologise, or I'd go to her and see if she was ready to apologise, then I'd explain what I wasn't happy about, what I'd rather see her do, then we'd have a hug, and move on.
There is no power struggle to be had, she is a 5 year old child, you are an adult parent. It's that simple.
This has all worked very well with my daughter, she is now a young teenager, and all her teachers love her - say that her behaviour is exceptional. She is a delight. That isn't to say we don't get teenage strops and tantrums and moans - it's totally normal. I try to discuss things with her now, even more now she's older, but there are times when the answer is just plain no, or she needs to be brought up short.
We have a great relationship too. We talk a lot, discuss things. She's a person I admire very much. She's funny, kind, clever.
I have spent much of my adult life training animals - and quite honestly, it's not so different from training young children - the principles are pretty much the same. Quiet, kind, consistent - clear boundaries & expected ways of behaving.