North and South America had their warmest Mays on record, as the heat contributed to wildfires and posed risks to people and wildlife.