When I was learning Linux, if something went horribly wrong when I’m configuring something, my instinct was to reformat.
You can reformat but don’t depend on it every time. Try to debug or fix the issue you have. If you can’t fix it, you can learn what caused the issue and then reformat. That way, you learn more and not repeat the same mistake.
I’ve reformatted multiple times and at one point I just got familiar with enough things that I was able to maintain the OS and fix issues every time.