Examination of wreckage (exactly how the metal bent upon impact) can reveal the general attitude and velocity of the craft at impact. There is good known science for that, and the NTSB happens to excel at using that science.
In a nutshell, if everything is bent toward the left side, then you know the thing hit left side first. If a five inch section of sheet metal is crushed to one inch then the velocity/force required/applied to do that is known. There’s way more to it than that, but you get the idea.