Angry SO

I dont know how to write this I'll try to keep it shorter.... But this morning my SO wakes up to get a glass of water and says he'll be right back to cuddle. Meanwhile the dog climbs in bed. My SO comes back to cuddle and starts getting mad-the dog is in the way and he cant find his phone- so then he gets up shuts the door angrily and I can hear him slam the bathroom door shut. Then he gets ready super quick and I'm like okay what's up. Then he tells me that this is the 3rd time this week the dog has been in bed and that I misplaced his phone. Like I didn't even touch your phone and I could have kicked the dog off? He's like too late. So I said okay I'm sorry. And he just keeps acting rude d mean and then I have this thing about people leaving angry at each other and I go to see him off and he is acting mad still so I said hey next time just talk to me, I can move the dog? We talk for a few minutes but I felt like I was begging him to fix it so I said whatever i hope your day gets better and I'm sorry, and then he finally is like okay come hug me. I said no it's too late. And then he just left . I feel terrible that I said that to him but this isn't the first time I've felt like i was begging to fix a fight that he just randomly got mad and mean and this time I just needed to turn him down for once. Am I wrong? Does anyone have tips on how to stand up for yourself when your partner just wants to be mad randomly?