I got a flu vaccination.

Literal

Flu [possessive-の] prevention vaccine [possessive-の] injection [object-を] did.

流感 is a shortened form of 流行性感冒 (influenza). 予防ワクチンの注射 (preventive vaccine injection) chains three compound nouns. をした (did) is the casual way to say 'got a shot.'