Building energy codes set a minimum level of energy efficiency for new homes and commercial buildings. They are usually set by states or cities based on the model International Energy Conservation Code (IECC).
This fact sheet summarizes the benefits of building codes to households, the economy, and the climate, including describing the findings of a federal analysis that estimated that a typical household would save a net of $15,000 from a house built to the 2021 IECC compared to one built to the 2009 code.