My Pixel 3A stopped receiving security updates after less than 3 years. I remember Google did this to start using their own chips in their phones.
Two or three years is not even close to the support Apple provides. It sealed the deal for me and I switched to iPhone.
Yes, they've since more than doubled the support lifetimes to seven years.