I remember before I switched to iPhone I would wait and wait and wait and wait for the latest android and updates and a whole new version of android would roll out before I would even get the previous version.
My S21 Ultra is in its 3rd year and regularly updated. Should get 5 years of updates, and I intend to keep it until then.
Also, the writing is on the wall that the EU will force phone makers to years of updates, changeable batteries and availability of spare parts.
It's also noteworthy that Google has the ability to update many system services via Google Play. The poor track record of updates from phone makers basically demanded it. In other words, an Android device that hasn't received any system updates in a year or two is still fairly usable.
https://doc.samsungmobile.com/sm-a705fn/sek/doc.html
Looking at this list of devices getting updates, it only lists A70s with "biannual" updates, so A70 may no longer be updated:
Ideally Google would mandate a minimum number of years for both feature and security updates that matches theirs of three and five, respectively. Having said that, these really are wasting assets thanks to storage wearing out, but that's true of all phones, regardless of manufacturer.
But I agree, it's great how Apple supports devices for 6 years with major updates. It would also be possible for Android phones if SoC & phones manufacturer actually cared.
I also have a Pixel 5. It received Magic Eraser, which used to be a key feature of newer Pixels, as part of a regular Photos app update.
I'm still getting major updates too, but, tbh, they aren't that critical. Chrome, GMail, Maps, YouTube, Calendar, Messaging, the app store itself (including UI) and the core web browser will keep getting updates well beyond the end of life.
There really isn't a direct comparison here, but I wouldn't switch in either direction due to updates.
For what is worth, I have a Galaxy Tab S6 from 2019 that is still getting security updates, although it wasn't updated to Android 13: https://doc.samsungmobile.com/SM-T865/ROM/doc.html
For reference, the latest version of iOS will run on 5 year old iPhones when it is released.
For operating system updates, Samsung pledged 4 years of updates for the flagships starting with S21.
The difference between Android versions isn't big. I also mentioned in another comment that on Android, to cope with phone makers not pushing for system updates, Google can update many system components via Google Play. And apps remain compatible. Being 2 versions behind the latest Android is OK.