Pronoun agreement can be trickier than it might seem on the surface. The rule is that we must make sure our pronouns agree in number and gender with the nouns they are replacing. For example, when we write a sentence about a girl named Sophia, we would use she as the pronoun to refer to her.
But things get a little more confusing when we are talking about a kind of abstract person, and the “rule” on this subject has recently changed in most circles. In the recent past, to avoid sexist language, we couldn’t write he or she. Instead, we had to write he or she.
But, because most people would just end up writing they, which technically does not agree in number, the “rule” began to change. This is a great example of how living languages, like English, change, and the change happens when people make a change happen. It’s really pretty exciting!
It used to be incorrect to use what we now call “the singular they.” Here is an example:
Now, it is perfectly acceptable to use they or them to refer to a child.
So, now, this would be considered correct:
Of course, because this change is new, you may find some people who disagree, but most academics now agree that “the singular they” is correct. And, usually, academics are the last to accept language change.