https://www.cpubenchmark.net/year-on-year.html
The frequencies may not have increased beyond 2-3 GHz but the speed has still got faster because modern processors are much smarter and are able to do more work per cycle. They have all sorts of fancy tricks to do that - speculative execution, hyperthreading, branch prediction, etc.
(More cores aren't a performance improvement; if you were willing to deal with non-serial execution, you could have just bought 32 Pentium Fours; putting them all on the same chip is convenient (and cheap), but as a price/performance improvement, it's all price, no performance.)
That's only true if you only consider ALU throughput for performance, but in terms of real world performance, where the interconnect between cores and memory is hugely significant, a multicore processor has many advantages over a rack of otherwise equivalent single-core NUMA nodes.
My guess is that there are now a lot of forms of hardware acceleration of specific things that make your daily experience seem faster, but I haven't seen them catalogued and put in perspective with measurements.
I would think that and cache size are large differences between a P4 and the i7 running at about the same clock frequency.
I haven't read about P4 and NetBurst in a long t ime, but is mu memory serve me right, P4 is usually less than 1ipc due to its very long pipeline (31 stages IIRC) that is very prone to pipeline stall. Modern processor can also do many thing faster. I think P4 takes ~110 cycles for integer division, while modern cpu can do in ~30-40 cycles. And IIRC, P4 cannot flush the division unit so if branch/jump prediction is wrong and division is speculated, it was to wait until the division unit finish computation before it can resume execution.
My memory isn't so good, and I never owned a P4, but according to Wikipedia in August 2001, they released one at 2GHz on 180 nm. Almost 20 years later, my laptop i7 is running at...2.1GHz (base)? And 14 nm. That's kind of mind boggling. I think it would be interesting to read/write an article comparing the two in depth and what performance benefits you get from the newer chip.