

The only caveat to phones is their batteries. Batteries have a limited lifespan, and users can’t easily change the batteries in current phones.
There’s also the risk that the mobile device manufacturer will brick your phone if you try to replace the battery yourself or have a 3rd party do it.
From a hardware spec standpoint, though, most flagship phones could easily last a decade.
I’d stay away from folding phones unless you want to replace your phone every year or so. I’ve known several people who had them just to have the screen start delaminating right after the 1 year warranty expired.