On Android, a much bigger part of the OS gets updated through the Play store and Play services, you certainly do get access to new features 5 years into the future.
That’s true, Play Services has proved a great way to get useful feature updates out without being beholden to the carriers and manufacturers, but it doesn’t really help much on the security side.
It's not perfect and Google should definitely figure out a way to push low-level security fixes, but it does help on the security side as well.
A lot of the attack surface (the Play store itself, messaging apps, browser, system webview, ...) keeps getting updates for many years after the end of system upgrades delivered by the OEM.