This, really. While screen sizes have been getting bigger, the aspect ratio has been getting taller and the bezels/body of the phones has been getting smaller. While I agree that regardless of all of this modern phones are too big, you can't just look at the screen size.
Here is a comparison between a few phones: https://phonesized.com/compare/#1784,1862,1863,365,632,126 (the Zenfone 9 is not in the database yet, but it's almost identical at the Zenfone 8).
What I find more interesting is that their website focus so much on it being compact, but it's actually just pretty much the same size as the regular iphone.