It’d work for everything, data lives in your storage devices, not the motherboard.
Barring UEFI/bios config issues or hardware incompatibility you just swap hardware and boot up exact same as before.
You might then need to make small tweaks if things aren’t setup quite ideally. For instance if you have lemmy binding to a specific IP rather than 0.0.0.0 and you use dhcp reservations then you might need to adjust that IP in config. Or if you don’t have fstab using uuid then your mounts might be messed up. But that stuff can all be avoided and they’re minor to fix.