Google has a performance graph built in when I search for things like "NEE stock". It shows the total performance - not the annual average - over a time period.
NEE: +30.82% 5 yr; +32.89% 1 yr ... subtracting gives -2% from 2020-2023
SO: +39.60% 5 yr; +26.26% 1 yr ... subtracting gives +13% from 2020-2023
DUK: +24.28% 5 yr; +22.85% 1 yr ... subtracting gives +1% from 2020-2023
Two stocks have almost all their 5 year performance in the past 12 months. The lowest was 2/3rds of its 5 year performance in the past 12 months. These stocks went nowhere for years, and had very impressive 2024 performance.
Besides AI datacenter demand, President Biden passed the Inflation Reduction Act, which included support for EV adoption. EVs require more electricity, and the U.S. electrical grid has been under-invested in. So the boost might partly come from AI datacenters (much higher energy demands), and partly from the Inflation Reduction Act. Congress could repeal parts of that act over the next few years, so it seems risky to rely on that. I guess we'll know more in 2025.