The trapped liquid warms, turns to gas and has nowhere to go. One litre of liquid nitrogen becomes roughly 683 litres of gas at room temperature, so a short section of pipework holding a small volume of liquid can generate pressure far beyond what that pipework was designed to contain. The failure, when it comes, is sudden and directional.
This is known as a cold trap or liquid lock, and it is one of the classic hazards in cryogenic pipework rather than an unusual event. It happens whenever a length of line containing liquid is isolated at both ends, which is easy to do without noticing during a routine valve sequence or at the end of a transfer.
The engineering answer is that any section of line capable of trapping liquid between two isolation points must have its own pressure relief device fitted to that section. This is a design requirement, not an optional addition, and it is the first thing to check on any transfer line or manifold installed or modified locally.
The procedural answer is just as important. Valve sequences should be written so that a line is never isolated at both ends while it still contains liquid, and staff should be trained to close in a defined order rather than by habit. Where a hose is disconnected, it should be allowed to vent and warm before both ends are capped. Modifications to pipework belong with a competent person, since a locally added valve can create a trap that did not exist when the system was designed.