The battery in my iPhone 11 pro (6.5 years old) is still basically fine as long as I charge it every day. None of my previous smart phones were able to keep enough charge to be useful after 3-4 years.
My Pixel 4a would also still be fine. If Google had not killed the battery. I think by now Google has asked (=paid) people to swap batteries on at least 3 different Pixel phones.