The sons of Pharez, though Judah's grandchildren, are here mentioned among his sons, because they are put in the stead of Er and Onan, which died before.
Related Commentaries of Numbers 26:21
Numbers 26:21
21 And the sons of Pharez were; of Hezron, the family of the Hezronites: of Hamul, the family of the Hamulites.