The so called expiration date is only when the phone manufacturer stops making security and other updated for the O/S on your phone. For example, if you have an Samsung phone with Android you will stop getting Android updates after that date
Even after that date people are free to use there phones and many do.
Sure there is a security risk when both Android and IOS no longer receive security updates but most people are willing to take that.
Phones do actually become obsolete for different reasons. Both old Android and IOS phones may not be compatible with cell phone providers and the Internet. If the phone is really old and only has 3G then it was made totally obsolete in 2022 when 3G service was shut down.
BTW, maybe 5 years ago Samsung only provided about 2 years of software updates for their phones. Apple provided software updates for their phones a lot longer than that. Enough pressure was placed on Samsung that they had to increase their support to 5 years now.