Charge battery or buy new one?

I got my battery tested because my hazards have been flashing when I start/open my car.

Sometimes my doors won't lock either

They tested it and it says it needs charge. It's at like 54% and I bought the car used and this battery could've been in since OEM.

Should I charge battery or buy new?