It's hard to estimate how much of Apple's advantage came from the 5nm process, but we can get a guess by comparing the A13 and A14. One of the biggest differences between last year's A13 and this year's A14 is the 5nm process (vs 7nm+). The performance increase seems to be on the order of 15% [1], and Apple was able to fit in a lot more transistors- 11.8B vs. 8.5B, though we don't know how many of those transistors were spent on the CPU, and how many were spent in other areas like the GPU or ISP.
Seems like the additional transistors and lower power consuption were used to increase performance in a bunch of ways- higher clock speeds, more cache, and a bigger reorder buffer being the obvious improvements. Perhaps AMD can pull off a similar improvement when they switch processes.
[1] Spec2006 numbers from https://www.anandtech.com/show/16192/the-iphone-12-review/2