I think with Apple it's all or nothing. For Android it stops gradually: first you stop receiving OS updates, then system updates and after a while also security updates [1] and then finally maybe also apps.
[1] although they have in past updated very old phones when something really bad has happened.
[1] although they have in past updated very old phones when something really bad has happened.