The examples being lets say BMW E46 M3 and the new BMW G80 M3. The E46 has a 3.2 i6 NA that makes 338hp, the G80 M3 has a 3.0 i6 twin turbo that makes 510hp.

What technological advancements have been made, other than the turbos and 20 years, that separate these 2 cars?

If you know something really technical feel free to share.