Long post incoming:
I'm not big of punishments or consequences (unless they are natural consequences), especially when the foundation of parenting isn't ideal – and those foundational blocks can be really easy to slide because kids are ever-changing and sometimes it isn't. until problems occur that parents recognise that approaches need to be different.
Imagine parenting tools like a pyramid. The best and largest foundations to lay with your daughter are quality 1:1 time, and praise. In your 1:1 time, ensure that it happens every single day – whether that's for 15 minutes or an hour – ensure that she knows it will happen every day and ensure that what you do in that time is her choice. Whatever it is, it's HER choice (barring anything actually unrealistic of course.
With praise, heap it on all day – it will seem completely OTT and unnatural, but persevere. You want to praise every desirable behaviour you see, as soon as you see it – whether that's asking for something nicely, doing her homework digitally, tidying up, taking her plate and cup to the sink, getting ready for school, absolutely anything. Praise her and be specific in why you are praising her. She needs to know you think she is a good kid, and, more importantly, SHE needs to feel like a good kid.
Next is incentives – people often dismiss this as they think it's more appropriate for very young children, but it's actually very effective in children all the way up to 10. It's just a bit more involved with older kids. Let her choose something to collect when she displays a desirable behaviour (eg, stickers), and at first choose only one thing to work on. For her, that's going to be speaking politely at the times that she usually doesn't
(As an aide, it it useful to keep a diary for a week of when her shouting/rude behaviour is triggered to try to detect a pattern – is it transitions? Meal times? After school? Before bed?).
Whenever it occurs, every time that she gets through one of these trigger points without shouting/being rude, she gets a sticker. Write a list together of what her stickers can earn her. 5 stickers may be a bag of chocolate buttons, 6 stickers may be choosing a family movie, 7 stickers might be staying up 30 minutes late – make the list her choice, her 'shopping' list can be both tangible and intangible things to earn. Heap on the praise when she gets a sticker, let her know what it's for, and heap on the praise again when she has collected enough to spend it on something of her choice.
Younger children benefit from an incentive prize every day. Older children may begin this way, but then see the value in persisting in desirable behaviour to save ip their stickers. I have 8yr old twins – one collects stickers and the other collects pebbles. One them had the diligence to save up a whopping 30 pebbles to buy a new football last weekend!
Incentives stickers/pebbles should be frequently changed up – after a few weeks, change what the 'earning behaviour' as then highly praise instead for the old 'earning behaviour'. Change the shopping list frequently, allow her to add things, make it more difficult (but not too difficult) to earn big wins if they are doing consistently well – keep it fresh and interesting.
Next: house rules – like the incentive stickers/pebbles, decide as a family on a short list of rules that everyone in the house has to follow. Eg. speaking with respect / cleaning up after yourself when you've made a mess etc. At the day of the day/week, discuss as a family where you have all seen these things happening around the house. Everyone in the family can earn 'points' and decide as a family what big thing you are working towards – a theme park/zoo trip in the summer? A cinema trip? etc etc.
Next is simple but effective – when you are giving directions or instructions, tell her what you want to see from her, not want you don't. Instead of 'don't talk so loudly / stop running around the house / don't slurp your food', say 'please speak more quietly / please walk carefully around the house / please eat carefully and quietly.'
At the upper end of the pyramid are the more negative things you may have to do, once you have laid all the above underneath – ignoring and consequences.
Ignore low level undesirable behaviour – very tough to do, but try not to give an inch. If she is in a shouty, irritable mood or having a full blown tantrum, then this is not a teaching moment and there will be no reasoning with her. Unless she is harming others, herself or being destructive – just ignore her. Calmly tell her 'I can't help you when there is shouting' / 'I can't help you until things are calm' / 'I can't help you when you speak to me with a rude voice', and then say 'I will speak to you when you have calmed down', and either leave the room, or stay close by but get on with something else. Don't engage with a back and forth whatsoever.
Now – when you first start doing this, it's common for the behaviour to escalate. Their usual way of acting out and getting attention won't be working, so they will push harder. Persevere and they will grasp that it's no good. As soon as they are calm, praise them for calming their body down, offer a cuddle and ask what they need help with. When they are fully calm (and this might be the next day), speak about what happened, how feelings are OK but some behaviours aren't, and speak together about other ways we can let out our big feelings.
With the above, return to a warm and receptive demeanour as soon as she starts displaying desirable behaviour again.
Consequences are at the very stop of the pile and should be used infrequently and only when you have nailed all the above. They should also ideally be linked to the undesirable behaviour. Eg, they have a tantrum at the park = they have to leave the park. Now, that's not always possible – and that's why they should be so infrequently used, as they are just not incentivising for desirable behaviour. So you can make unlinked consequences when you absolutely have to, but I would use them only at the worst offences eg, breaking something in anger. Say something like 'Because you broke the vase, TV/screens are paused for the rest of the day. You can watch TV again tomorrow. Let me help you find something else to do.' Don't withdraw your warmth from her – if she is managing the consequence well, praise her for it, and tell her how well she is doing.
I have done all the above with my 8yr old twins for the last 7 months – both of them had behavioural issues in different ways. It's diligent work, and requires a lot of attention, but I have seen drastic improvements in both of them.