Expanding on that, having a good set of automated tests gives you confidence that all the pieces of the system fit together properly. With good tests in place, you can focus on changing a small part of the code without having to understand how it relates to every other part of the project. If the small change affects anywhere else you'll see this in failing tests.
If you aren't already, start writing unit and integration tests for your code. It can feel like unnecessary overhead at first but you quickly reach a liberating point where you can lean on the tests to tell you how any changes affect the bigger picture.