:/ There’s old and cheap phones that are still supported. Support varies between models. I have a Oneplus 6 running the latest Android, 15, perfectly fine. It has 6 years. The camera is ok, but could be better.
Manufacturers and Google end support for Android phones within 2-3 years of their release (not 2 years since you buy it). Afterwards they don’t get security updates which is quite dangerous given that we do everything on the phones nowadays, and we will do even more.
Note that those old official, unsecure phones are allowed still to do banking and other things. Even if they aren’t secure. The manufacturers don’t care, they want you to buy a new phone every 2 years from them.
And the actually secure phones running LineageOS, with up-to-date Kernel and security patches, with latest Android, sometimes are not allowed to run banking apps or other things in the name of security. Google and manufacturers don’t care about security at all. They just want control.
Don’t use ChatGPT for answering things.