[Question] Is it better to fix a problem directly, or start again so the problem never happens?

Recently, I’ve found myself in the dilemma between solving a problem directly by fixing it head on then moving to the next thing and starting again so this time i don’t make the same mistakes or encounter the same problems I experienced before. Most of the time I find myself unconsciously choosing to restart rather than fix. Is this approach any better than the latter?