In French, noun gender is determined by the head noun—the core word in a compound phrase. For "soccer ball," the head noun is balle, which is feminine.
La balle de foot — "the soccer ball"
Learners often assume the last word or the "main concept" determines gender. But French grammar is structural: the head noun governs agreement for articles, adjectives, and pronouns.
Same sport, different head noun, different gender. Always identify the head noun first.