Referees are nicer to attackers nowadays, plus there's several rule tweaks done in recent decades to make attacking more worthwhile. Goals scored at WC bottomed in 1990 iirc.
Goals scored isn't a great metric though since there's more teams than ever. Highest goal to game ratio was during the 50s.
However, these records are incredibly influenced by the era he played in. Look at a list of the highest scoring seasons for teams ever and it’s either far pre expansion or the late 70s and 80s - Gretzky’s era.
Messi’s records are astounding for the reason that soccer scoring trends have remained far more stable (imo)