Artificial intelligence, cloud computing and data centres led to a spike in electricity demand between 2020 and 2023.