Apple should be offering updates and support for iPhones with A13 (SE) and A14 (12 mini) chips well into 2027. For the iPhone XR with the A12 chip, it could be a little less.