Is it worth fixing?

My gf just bought a new phone and handed me her 4 years old iPhone 12. The back glass is shattered and battery health is about 79% (original battery, never has been replaced).

I was planning on replacing both the back glass and the battery and keep it, but do you think this is a good idea?

The only thing I care is for it to work for at least 2 more years. Do you think the invesment is worth it?
I don't want to waste money on a phone that won't work good in a year.