What phone? If battery is semi easy to replace I'd go that route but a lot of phones make it very hard.
Pixel 7, looks very hard
Might want to check the used market on the pixel 8. If you end up replacing battery but bust the screen in the process its going cost you the same as a used pixel 8. Also when you replace the battery of the 7 it will lose its seal and wont be water resistant anymore. These companies know what they are doing. I miss the days of easy access to battery and sd card support on these phones.