The collision was due to one train derailing first, if that was due to the track (as mentioned in andy12_'s toplevel comment) then listening to warnings could perhaps have avoided the accident.
Could have, though both trains were going slower than what the mechanic union asked for. Either or wasn't a factor, or the conditions were even worse than all parties believed.
Some have mentioned that the tracks were installed during may 2025, it's also the first winter so track issues and then thermal contraction could've cause too much strain.
Most recent reports indicate a broken weld on the track, so definitely possible damage from frost heave (is that a thing in the area it derailed?) or poor construction practices.
Since two trains collided, wouldn't that have happened regardless of the state of the railway tracks?