She tried to keep the rumor from spreading.

Literal

She [topic-は] that rumor [subject-が] spread thing [object-を] prevent volitional [quotative-と] effort-did.

~のを防ぐ wraps a clause ('the rumor's spreading') in nominalizing の, making it the object of 防ぐ ('to prevent, block'). 防ごうと努力する combines volitional ~う/~よう ('let me try to') with quotative と and 努力する ('make efforts') — a fixed pattern for 'tried to / made efforts to do X'. Note the dance of particles: が inside the nominalized clause for 'the rumor spreads', を on the wrapped clause as the object of 防ぐ, と marking the volitional intent as the content of the effort. Japanese particles work overtime in nested clauses like this.