My mom had an S6. T-Mobile notified her a few months back that it would no longer support her phone come September I think it was so either upgrade or go elsewhere. I don't know how Apple functions on it in terms of that component. But my mom just got a new S21+ so she's fine now she didn't really want to upgrade though.
I don't see anyone taking any of these cell phone providers to court over them saying they will no longer support a certain phone (which is about operating systems as it is other functions of the phone and T-Mobile isn't the first to be the ones to do that) nor have people, to my knowledge, has anyone taken Microsoft or whomever to court when they've notified customers who have a certain operating system that they will no longer support them nor to my knowledge have people taken websites to court when they don't work on a certain operating system (either too old or actually too new/incompatible as has happened with Chrome IME). So I'm not sure there's any legal standing for a court to see what you're talking about. It's not the first time people have been told "do this or your whatever won't work anymore". And I don't know about you but I frequently have apps (FB, Disney's apps, game apps, etc) that have functionality issues until I update them. I know Disney's app has forced updated to get the new TOS on them or it wouldn't work at all.
FWIW my mom was under Sprint's network, Sprint's plan, etc prior to the notification she got. Now she was forced to switch to T-Mobile's network and plans. Eventually I will have to do the same as the merger only required a certain amount of years for grandfathered in people.