UPS
Most likely its the battery and that will be cheap to replace as most of them are pluggable and use standard lead acid cells available inexpensively on Amazon.
Be worth a try to replace the battery. If you can borrow a battery of the correct voltage from a similar unit you can quickly confirm the problem.
If its got electrical issues other than the battery, replace it.