If you're really on a budget you can probably go back even more generations and get both an acceptable phone and one that'll get updates for some time. Which are probably more important for iOS because it's such a single big target compared to the fragmented Android world. I'm currently using an iPhone 6s I got in February 2020 for $200 from my Consumer Cellular MVNO which unlocks it after 6 months.
One thing you'll lose with the older phones sooner than iOS updates is AppleCare support, but if you get a good bargain to begin with....