Most claims about only children do not survive the data
Only children are said to be spoilt, lonely and poor at sharing. The claim traces to late nineteenth-century survey work of extremely poor quality, and it has outlived its evidence by about a hundred years.
Later studies find only children broadly indistinguishable from children with siblings on sociability and adjustment, with small advantages in achievement and in the quality of the parent-child relationship that are most plausibly explained by resources and attention rather than by birth order itself.
Where a difference shows up, it is usually small and usually explained by something other than the sibling count.
The stereotype persists because it is memorable and because everyone can name a confirming case. That is how stereotypes work, and it is a poor basis for a family decision.