I've currently got a Samsung S10 which I has everything I need, plus more over the current flagships like triple camera (some only have dual), expandable storage and the elusive headphone jack.
However, the only thing that bugs me about Android phone is how poorly the battery holds up/amount of major software updates. I believe I've just received my 3rd and last one. iPhones get way more updates and anecdotally hold up better.
So I'm considering switching to Apple after over a decade with Samsung going back to the S2. After they've removed expandable storage and the headphone jack, I don't think there is enough separating flagship androids vs iPhones anymore.
I know that mid range Android phones still have some of the above features but I don't think they have much longevity considering I want my next phone to last 4-5+ years.
TDLR: My S10 is 3 years old, looking for strangers to convince me to suck it up, get a new battery and hold onto my phone for another year (to avoid dropping 1.5k on an iPhone)
I voted 3 years but will probably keep my current phone until it either breaks or I have a reason to upgrade (i.e. better battery or camera or something) but I've found over the years that I have had particular phones for around 2-3 years.
From what I can recall my path has been (with smart phones, had a bunch of none smart phones before this as well as just using company phones for a while):
2013: Samsung S4
Late 2015: LG G4 (broke screen on the S4 and decided to just upgrade)
Early 2017: OG Google Pixel (LG G4 had boot loop issue)
Mid 2020: Samsung S20+ (Pixel battery would get to about 50% in a couple of hours and then the phone would just turn off).
So far, 2 years in I don't see any real reason to upgrade any time soon unless something breaks or the battery starts to deteriorate.