One of the things that mars the Android experience a little bit is the relatively short support offered by some manufacturers, a period that can be as short as two years. Samsung has upped the ante by offering up to four years of updates, and it seems that Google is going even further with the Google Pixel 8, the successor to the Pixel 7 (pictured): it's promising five years of system updates.
Operating system updates are crucial not so much because they add new features but because they get rid of problems that have emerged since, or that just weren't fixed in, the initial OS release. Without them you're increasingly exposed to malicious software, and you may ultimately find that the very latest apps won't work on your phone. So this is a very big deal, and it's another way Google is competing directly with Apple.
Why don't Android phones get the same support as Apple ones?
The short answer is because they don't make the operating system; Google does. And that means whenever the OS is updated they need to do their own testing, and in some cases tweaking, to ensure that it runs properly on their own handsets.
That's a huge job. For Apple, updating iOS means testing on a few years of iPhones – so that's four models per model year. The current compatibility list for iOS 17 is 18 iPhones. The Samsung Android 13/OneUI 5.0 release was for 54 phones – and unlike the iPhone, which only comes in a half-dozen different sizes over those 18 devices, the Samsung phones come in lots of different form factors and configurations.
More phones means more tests means spending more money, and while every manufacturer is different they all agree that after a certain point, it doesn't make sense to keep updating older devices.
According to 9to5google, Google isn't quite promising five years of operating system updates; rather, it's promising five years of "pixel updates". That suggests you might get three years of OS updates and then a further two of security updates only. Again, that's similar to Apple: not all devices get the latest iOS features.
What it does mean is that if you're planning to buy your phone and keep it for a long time, the Pixel 8 may be the better long term buy than the Samsung Galaxy S23, which has a slightly shorter support period.