There are a few ways to replace a UPS battery. The most common way is to remove the old battery, unscrew the screws that hold it in place, and replace it with a new battery.
You can also buy an UPS replacement battery kit, which typically includes the battery, screws, and instructions. If you can’t find a replacement battery or kit, you can usually remove the old battery by unscrewing the screws and lifting it out.