Unless something drastic changes, I'm sticking with Apple because of their demonstrated long-term support. Every phone since 2015 has been supported for 6-7 years. And that's actual support, not a "technically correct" mix of real support and security patches only.
That's overlooking the fact that Apple does not release the full featureset of new iOS versions on older devices and as years pass the number of feature omissions increases.
> The latest available version of the firmware shall be made available for a minimum period of eight years after the placing on the market of the last unit of a certain product model, free of charge or at a fair, transparent and non-discriminatory cost. The latest available security update to the firmware shall be made available until at least eight years after the placing on the market of the last product of a certain product model, free of charge.
(b)
> Information on the minimum guaranteed availability of software and firmware updates, availability of spare parts and product support shall be indicated in the product information sheet as from Annex V of Regulation (EU) 2019/2013.