Animals often balance asocial and social information strategically, adjusting when and from whom they copy based on context. Yet the cognition driving this dynamic--and its broader implications--remains poorly understood. Here, we show that nest-building zebra finches follow a copy-if-dissatisfied strategy, but only when social information aligns with recent experience: after observing a conspecific build a nest, males were more likely to choose the demonstrated \'social\' material--particularly on their first choice--if they had previously used low-quality material. Using Bayesian cognitive modelling, we estimated how latent learning mechanisms underpinned males\' material choices, identifying two asocial and two social governing parameters. These parameters provide the first formal evidence for the cognitive basis of birds\' nest building. Forward simulations informed--but not prescripted--by these parameters approximated observed material-choice trajectories, supporting their causal role. Additional simulations targeting simplified real-world contexts showed that payoff structure--not (dis)satisfaction--drove social material choice, though higher rewards did not proportionally boost its use, offering preliminary insights into the mechanisms underlying material-use variation more broadly. Our study illustrates how computational modelling can robustly link behaviour to underlying learning mechanisms and probe the generalisability of animal cognition--a rarity in this field.