Hardest line is when the cell carrier drops support. I held onto my iPhone 5 until the very day it could no longer work as a phone, and that was also far after it stopped receiving security updates.
Or what happens is they stop running the latest OS, then newer apps you might need stop supporting old OSes. Old versions of apps might even stop working with whatever servers. That or the latest runnable OS doesn't work with whatever 2FA bs you need to download free apps from the App Store, as was the case with the iPad 2 last I tried.