The diagram below represents two metal spheres, and one of them is connected to the earth so is at $0 \; \text V$:
The answer says that the charge of the earthed sphere is negative, and less than the positively charged ball. They explain that if the sphere has zero potential, the charge in it must cancel out the effect if the positive charge on the other ball, and since the earthed sphere is some distance away from the positive sphere, it will not need so much charge to cancel out the potential.
I do not get why this is the case. Shouldn’t an earthed sphere have no charge? Moreover, if potential is the amount of work done per unit charge in taking a positive charge from infinity to that point, wouldn’t the charge have to be exactly $-Q$?