What should I do if my wife yells at me?

You can’t have a productive conversation when you’re being yelled at, period. Tell her you’re ready to listen when she can speak to you calmly, and then walk away. I learned the hard way that engaging with rage just makes everything worse.