Less than a year after taking the legal reins at Norfolk Southern Corp., Nabanita Nag is being put to a career-defining test in the wake of the rail carrier’s massive toxic-material derailment in East Palestine, Ohio.

The company, which reported record annual profits just a month ago, suddenly is grappling with a blizzard of lawsuits, attacks from angry residents, pointed questions from government officials and intense scrutiny over its safety record, which has deteriorated in recent years.