This longer-term support, while still not as long as I'd like it, I'd a big part of why I switched from Android for the device I mostly use. I still keep a few de-crapified/de-bloated Android phones for audiobooks, music files, and as a KDE Connect controller for a media PC, largely thanks to F-Droid, but the security updates on this hand-me-down iPhone give me some peace of mind.
If/when this XR dies or is no longer supported and another old-but-good gift phone is not in the works I'll probably look for a cheap-enough, good-enough Android and stop paying for Apple One. As I get older and the desire for novelty is replaced by the expectation of consistency and reliability for communication, information (a web browser), and a decent camera, I just want this device that I'm used to to keep working.