Human sociality is governed by two types of social norms: injunctive social norms, which prescribe what people ought to do, and descriptive social norms, which reflect what people actually do. These norms enable people to cooperate in the face of group-wide challenges. While previous experimental work has shown that people’s behavior is influenced by social norms, several open questions remain about the natural emergence of injunctive and descriptive social norms within populations and their causal influences on cooperative behavior over time. To understand how cooperative behavior emerges and is shaped by changing social norms in a non-experimental setting, we studied mask wearing during the COVID-19 pandemic. Mask wearing has individual benefits, but it is also a cooperative behavior that provides collective benefits of reduced disease transmission in the community. Leveraging two years of longitudinal data from a representative sample of adults in the United States (18 time points; n = 915), we tracked people’s reported mask wearing and their perceived injunctive and descriptive mask wearing norms as the pandemic unfolded. Longitudinal trends of norm perceptions and self-reported mask wearing suggested that norms and behavior were tightly coupled and both changed quickly in response to recommendations from public health authorities. In addition, a random-intercept cross-lagged panel model revealed that perceived descriptive norms, but not perceived injunctive norms, caused future within-person increases in individuals' mask wearing. These findings show that, during uncertain times, cooperative behavior is driven by what others are actually doing, rather than what others think ought to be done.