When you have a persistent issue which isn't going away just by reacting to it in the moment, it usually helps to have a bit more of a structured plan to target a replacement behaviour.
So to do that you want to sit down and identify the actual issue, be specific.
In the OP I can see several different things.
"You don't get to tell me what to do!" --> defiance, so you could target compliance aka yes, I do get to tell you what to do/she needs to defer to you and accept your decisions.
"I'm not having that, give me the pom bears". I said "that's very rude, where are your manners? You can have the pom bears once you've eaten the apple".
This is IMO three different things. First of all you have not accepting your decision, which is probably defiance/compliance related again.
Then you have the rude language/demands - you might want to target how to ask politely.
Lastly a possible third thing in that you would prefer her to eat a healthy snack (fruit) before more junky food (crisps). I don't know if that was your aim or the apple was a random choice but you wanted her to follow it because you said so.
Then, she escalated after you'd said no, which is a completely separate issue and the thing you'd want to target would be emotional regulation.
Often IME it helps to separate out the issues, because then you know what you're targeting, rather than you getting increasingly narked as she crosses every boundary at once but she never gets a clear message about what exactly it is you're objecting to. So the four identified in the post are these:
Defiance > Compliance (Following your instructions, accepting your word, not trying to argue/negotiate). To target this you'd basically up the praise every time she DOES do something you've asked her to do the first time, and try to initiate opportunities for this by giving lots of instructions for easy/fun things. However it also means that you need some kind of predictable, token/small repeatable consequence if she is not doing or accepting what you've said - 123 Magic can be good for this. DO NOT escalate yourself or do things like dance around holding the bag out of her reach. Just shut down the interaction and go home if necessary (without dragging - she won't stay behind on her own.) This whole thing relies on you not losing it yourself, which is really tricky to do when DC behave this way.
Demanding > asking nicely (Using words like please, questions, nicer tone of voice etc). To target this, it would be helpful to give her a second chance to request something, perhaps modelling the way you would like her to ask first, and if she does it more nicely, give her what she is requesting almost unconditionally, at least as a first step. You can also practice this and help her see what it means to ask nicely, by playing a game (like a role play shop/café for example) where you pretend to be e.g. Mr. Rude and Little Miss Polite and using a very over the top charicature of how to ask for things rudely/politely. This is very fun for a 5yo, and it gives her chance to practice using both the rude version AND the polite version and see the effect it has on people (you can make it more interesting by having each person role play different characters to respond e.g. Mr. Sad who bursts into tears, Little Miss Irritable who snaps in response etc) - plus, this gives you a shorthand to use in the moment so you can make a joke like "I'm sorry? I thought I heard Mr. Rude just then?"
Sometimes with rudeness if this is not enough to have an effect, you can break it down and address different aspects separately. So for example, first target using "please" even though the effect of barking "I don't want that. I want the other PLEASE!!" is hardly less rude. Then go for "Please can I have X instead?" Then go for tone or volume, and lastly the opposite. (Bearing in mind younger children cannot always reliably monitor their own volume).
Junk food > Healthy first - I suspect this is not your main issue. In which case, when an interaction becomes a situation where you can either press for healthy over junk OR press for a more polite request or compliance, it makes sense to prioritise your main issue for now. Once that is more stable and accepted, you could choose to work on the diet issue.
Emotional dysregulation > Emotional regulation - this is a bit more of a complicated skill. But you could look specifically for resources about this if it's the one thing you want to prioritise.
Also for whichever issue you choose it's important to talk to DC about it and explain why it is important and why you will be focusing on it with any rewards/consequence you decide to add to it if you do. It tends to be easiest and most effective to work on 1-2 things at a time rather than 4+
This is excellent and where I got most of the ideas here: https://www.youtube.com/playlist?list=PLh9mgdi4rNeyEGNxBvNdOVlianDYgWuc9