She was scared but wasn't hurt.

Literal

She [topic-は] was-frightened [only-だけ] [with-で], injury [topic-は] was-not.

~ただけで is a useful little frame — past tense + だけ + で = 'just X (and that's all),' often setting up a contrast or limit. Here it lays out the relief: she was scared, but the consequences ended at fright — no injury followed. 怪我 ('injury, wound') as a topic-marked element 怪我は marks a contrast against what was the case ('fright was, but injury wasn't'). The は here is contrastive — drawing the line between the two outcomes.