I've swapped CPUs on a Windows 10 install (Ryzen 2600 --> Ryzen 5600X) and simultaneously swapped the GPU (RX 570 --> RX 6600) on my wife's computer and it was fine. However, I was going to be doing a reinstall when I got around to it, both for moving to Windows 11 for longer-term support, and to move the installation from a SATA SSD to a new NVME drive.
If I was doing anything with swapping motherboards, I'd definitely go for a fresh install. It could be fine, but it seems like a fresh install could be a good way to just avoid any gremlins that might crop up from such swapping and no re-installation.