Not necessarily. Smartphones have reached a level of performance and maturity that I could easily use one for 7 years if it wasn't for the planned obsolescence. But, somehow security updates stop arriving (even for Lineage). My next handset will be a Fairphone. At least they seem to be doing what they can to keep their devices running [1].
Apple is doing better. My SO has had their iPhone SE for 5 years now and updates keep coming.
[1] https://arstechnica.com/gadgets/2021/03/the-fairphone-2-hits...