Hi,
What version of Android are you using? Are both Link to Windows and Phone Link updated to their latest versions? Also, is your Windows theme set to Light mode? Scanning the QR code in dark mode can sometimes fail because the QR code needs sufficient contrast for the camera to detect it properly.In the meantime, you should check the article below if your devices meet the system requirements.
https://support.microsoft.com/en-US/Windows/Apps/PhoneLink/phone-link-requirements-and-setup