The societal effects of children\'s learning in cultural evolution have been underexplored. Here, we investigate using agent-based models how a propensity for early exploration in childhood contributes to cultural adaptation and the evolution of long human childhood. Using a complex cultural task, we implemented a two-stage strategy for exploring this space - children explore broadly, more likely to learn new behaviours, while adults exploit behaviours already known, incrementally improving them. We found that populations that followed this two-stage strategy achieved higher payoffs in the long term than populations using the two exploration strategies in a random order. Our models point at a \'just right\' length of childhood - neither too long, nor too short - allowing individuals enough time to explore before exploiting what they learned. Social learning increased payoffs when agents could copy individuals of a variety of ages. Payoffs decreased under environmental change, especially for long childhoods, because adults did not have enough time to recover between bouts of change.