The first thing when an issue pops up is to fix it. (Of course, prioritize based on the severity of the actual problem—not all problems need immediate solutions).
But more crucial than that is the often-overlooked second step. What you do to ensure that the same problem doesn’t happen again.
Most diet regimes fail because people lose weight but don’t alter their behavior; they don’t change their diet or start exercising, which means they’ll start gaining weight as soon as the diet is finished.
That’s why people jump from one debt to another; as soon as on loan is paid off, they immediately think of ten other things they want to acquire but can’t afford.
That’s why we have unreliable software that needs constant quick fixes; the team doesn’t change their methodology, doesn’t improve their development or test processes, and another bug pops out as soon as one is fixed.
And that’s why fixing a problem is only a part of the solution. The crucial second step is always to address the underlying reasons.