You can recover the config from the pfSense install image as long as the partition is not completely destroyed, it gives you option before you install:
https://docs.netgate.com/pfsense/en/latest/backup/restore-during-install.html#recover-config-xml-from-existing-installation
Worst case you can cat the recovered config to the console from there and copy it out into a file.
Steve