You can pretty clearly see obvious differences in his plate discipline and batted ball metrics from 2024 to 2023, so it can't be all "luck". His 2021 metrics look very similar to 2024, so there appears to be a sweet-zone with him that produces the best results.
He is swinging less often this year (nearly a 3% drop in overall Swing% from PY) and is being more selective at what he swings at (Called strike % is up by 3.2% and his Z-Swing% is down by a whopping 5.4%). Subsequently his Hard hit% is up by a whopping 6.2%. His Barrel% is up by nearly 3%, and his average EV is up by 2.4%.
What this tells me is that he is reverting back to being a "smart hitter" and looking for "his pitch to hit", and subsequently crushing it. Post 2021 it seemed like he got high on his success and he started just swinging at whatever was in the zone (and then he would get in bad counts and start expanding outside the zone as well). Since he is so talented he was still making contact, but it wasn't good contact. His IFFB% was 11.7% in 2023 and 11.2% in 2022; it is at 5.6% this year and was 7.7% in 2021.
I think it really is as simple as it sounds: he is making better swing decisions and therefore making better, harder contact (versus swinging more often and making shittier contact, which is where he was trending in 2022 and 2023).