While the Pixel 6 ushered in three years of major Android OS version updates and an additional two for security patches, that’s still nowhere near the longevity of the iPhone. Google hopes to change that on the Pixel 8 and 8 Pro with noticeably more OS updates.
My pixel 3a is 4 years old and reports 83 percent battery health still. I'll have no problem getting another year out of it. I've made a point of never charging above 80 percent with this phone and it's made a world of difference in how long the battery lasts. Previous phones I owned I would charge to 100 percent overnight every night and needed to swap in a new battery after 12-18 months.