MacOS after change of Motherboard

The OS is installed on the SSD. Most installations are non-specific: they will run on any Mac that the OS supports.

In any case: reinstalling the OS normally leaves your data intact on the volume. And you've got a backup in the event of something going wrong and your files being accidentally deleted. Of course you have.