With this said, updates on Android are different from iOS updates. Things like the browser, camera, gallery, etc, are updated via the app store, so your Pixel 5 still runs the latest Chrome and will continue to do so for years. They can also update system components (media engine, bluetooth, etc) via Play Store updates. Many new features (covid app support, earthquake alerts, etc) are backported via the Play services. On iOS all this requires a system update, on Android it doesn't.
This new Pixel 8 has 7 years of support, which is in line with the 6 or 7 years iPhones get. At least from now on Pixels should be as good as iPhones.