There's a type safety mantra that goes "make illegal states unrepresentable" (which came from Yaron Minsky at Jane Street, I believe.) In other words, if you try to represent an illegal program state, the type checker should flag it.
If you design a program's types with this in mind - which requires a fairly powerful type system to do well - that goes a long way to achieving the other commenter's claim.
Related to this is the idea of "static debugging". Following the above approach, the type checker will alert you to many semantic bugs while you're writing the program, without needing to actually run it.
Working through this process tends to help you discover bugs that the type checker alone can't detect. The type system and checker helps you reason about the program's behavior.
The end result of this is that it does indeed tend to seem that "if it compiles, it almost always works."
That's not to say you never experience dynamic logic errors, and it can depend on the kind of program you're writing.
Another way to think about it is that good type systems are the ultimate "shift left" in the software development cycle. They allow you to detect problems about as early as you possibly can. Leveraging that can make a big difference to the SDLC.