"The girls ate some cheese."
Translation:Les filles ont mangé du fromage.
Because passé composé compound verbs that use "avoir " as their auxiliary (as is the case here) do not agree in gender and number unless the direct object precedes the auxiliary.
"The girls ate some cheese" → "the girls ate it" → "Les filles l'ont mangé " = In this instance there is no agreement as fromage is a masculine mass noun.
However, consider this sentence:
"The girls ate the apples" → "The girls ate them" → "Les filles les ont mangées. "
Here, the girls ate apples (feminine) and if you place the direct object ("them" →les ) before the compound noun, and it is in reference to multiple feminine objects, it triggers past participle agreement.