Hello @MohanKrish, welcome to ST Community
Quoting from AN5096 "Power supplies and reset sources on STM32G0 Series", "VBAT is the power supply (through a power switch) for RTC, TAMP, low-speed external 32.768 kHz oscillator and backup registers when VDD is not present. VBAT is provided externally through VBAT pin. When this pin is not available on the package, it is internally bonded to VDD/VDDA. "
Although the STM32G0 series has a VBAT pin, the principles of maintaining power to the RTC can be adapted to the STM32C031C4, so, the RTC should be powered by the main VDD supply (it has to be stable and within the recommended operating range).
For backup retention, consider using a supercapacitor with a voltage rating higher than your VDD to maintain the VDD for the required duration during a power outage. (connect it in parallel with VDD so it can charge when VDD is available and discharge when it's lost, also consider using a diode to prevent the capacitor from discharging back into the main power supply)