Just to add to this, although the i5 is low to mid-tier (as mentioned, it goes i3, i5, i7, i9 within the "i" series), the i5's often perform the best in notebook specific applications because they can go longer at maximum frequency before they throttle. So that i7 or i9 might look better on paper, but in benchmarks you will see they often fall down to (equivalent) i5 levels or even below as soon as they see a sustained workload. Undervolting them slightly can also often completely eliminate throttling, which is super common in most laptops. If evaluating whether or not you want to pay for an i7, you need to look at that specific laptop's thermals, and a lot of the time it isn't worth it. Sometimes you can only get certain system configurations with an i7 though, so that has to be taken into consideration - much like option packages on vehicles or cable TV packages.
The generation is also very important because the "i" series has been around more than a decade, so just because something has an "i5" or an "i7" doesn't mean it's good or current, which is the exact reason Apple never shows you processor model numbers, because they keep old hardware around so long in their computer products and don't lower the price accordingly.