iOS 13 is supported on a 2015 device, the iPhone 6S
In Android land, this is unfortunately different. Longevity stands and falls (mostly the latter) with the (lack of) support of the chipset vendors such as Qualcomm and Mediatek. If they stop supporting a chipset, all devices built on them can not be properly supported anymore.
Just think of all of the unreported and unfixed hardware and software vulnerabilities in proprietary components. It is impossible to maintain a device without the chipset vendor's involvement. Apple, on the other hand, is its own chipset vendor.
The Android supply chain needs a drastic make-over to come anywhere near that.
Purism and Pine64 have made great strides in that regard though.