The top comment in this thread seems to imply that "NASA" approach is inherently better, especially for safety-critical applications. My view is that from the point of view of safety, the approach doesn't really matter and what matters is the results, i.e. reliability. At the same time from the point of view of development velocity iterative approach is clearly better.
In case of the sunk submarine, it seems that the company followed iterative, "SpaceX" approach, but they didn't actually iterate enough to make their sub seaworthy.
But you won't know the 'results' until you have a catastrophe and can do a post-mortem and find out where you went wrong. The approach does matter because one approach is 'let's do everything we can to prevent the catastrophe'. I mean, the approach is safety.
I'd argue this is in fact superior to NASA's approach, which rarely allows for uncrewed testing (and spectacular RUDs), leading to technological stagnation and catastrophic organizational risks. (i.e. internal resistance to doing anything about the O-ring problem on Challenger, even though they had been alerted about the potential issue).