@futurebird Also, I tell junior devs to think back to science class. Every change you make to code is an experiment; your hypothesis is that the new code will be somehow better than the old. But you can't put too many variables in an experiment, or you won't know which changes mattered and why.
So test often. Test after every line of code if you have to. It sounds annoying but it's much easier than the avalanche of bugs you get when running 1000 new lines the first time.
Go slow to go fast.