Classic Series, Prime Directive was non-interference in Pre-warp Cultures. Planet of the Nazis and Planet of the Gangsters showed the dire consequences of disobeying the directive.

TNG, Prime Directive had grown and grown.  Non-interference in Pre-warp Cultures was replaced with non-interference at all evah. Federation surrendered many planets to Cardassia rather than interfere with Cardassi invasion plans. Star Fleet had to remain motionless when Romulus and the Duras sisters invaded Klingon. Pen-pals, Riker made a big speech about the Cosmic Plan require the death of children and it would be the height of hubris to rescue that child.

Fortunately,  Prime Directive had grown and grown. Naomi Wildman boasted that she had learnt all 97 sub-clauses. Sometimes, Picard would find a sub-clause and rescue the people whom the Directive had condemned. But by the time of Voyager, all those loop-holes had been plugged and Janeway was thoroughly committed to the "Kill them All" philosophy of Prime Directive.