New York has become the first US state to place a moratorium on the construction of data centers.