The law, officially known as the Inflation Reduction Act, includes nearly $400 billion in spending and tax credits to accelerate the expansion of clean energy such as wind and solar power, speeding the nation’s transition away from the oil, coal and natural gas that largely cause climate change.