In general, this is quite easy.
If you have another computer, try and re-use the previous boot device. If it does not work, then simply install TrueNAS again, preferably the same version. Then after boot, if you have the configuration saved, restore the config and reboot.
All should be back to normal, with the exception of the network port. You will likely have to manually change it from the console because the new computer system board likely does not use the same make & model of network interface chip. Or even if it does, the NIC may be at a difference PCIe address.
TrueNAS was specifically designed to be easy recovery if you loose your boot device. Or even the whole computer, (but not the data drives).
ZFS was also designed to maintain existing data in any pools, assuming no hardware faults: