The power-management IC used on Raspberry Pi 5 integrates a real-time clock, and charging circuitry for a button cell which can power the clock while main power is disconnected.
Raspberry Pi offers a Panasonic ML-2020 Lithium Manganese Dioxide battery with a two-pin plug suitable for connection to the battery connector on the Raspberry Pi 5 PCB, and double-sided adhesive pad to attach it to the inside of a case or another convenient location.