It's been a minute since Boeings stopped failing spectacularly, so it's a mild surprise, but for a new plane's landing gear to collapse while parked, it reeks of manufacturing defect and QC failure...
Thankfully it failed when parked, things could have turned out much, much worse if it had been later during landing...