You can store two images in CFM0 and CFM1,2 for remote system upgrade. The dual configuration IP is required for triggering the reconfiguration, and the flash IP is required to read and write to the CFM flash during remote system upgrade.
You may refer to and modify the reference designs below accordingly.
https://fpgacloud.intel.com/devstore/platform/15.0.0/Standard/an741-remote-system-upgrade-for-max-10-fpga-devices-over-uart-with-the-nios-ii-processor/
https://fpgacloud.intel.com/devstore/platform/17.1std.1/Standard/i2c-remote-system-update-example/