Hi, you normally don’t link your Microsoft account through the PS5 settings. The linking is usually done from inside the game.
Open the game on your PS5 and look for an option like “Sign in with Microsoft account” or “Link Account.” If a QR code or an 8-character code appears, scan the QR code or go to Microsoft’s account linking page on your phone or computer and enter the code.
Make sure you sign in with the Microsoft account you actually want to use, especially if your PSN account may have been linked to another Microsoft account before.
If you’re not getting a QR/linking code, or the game keeps asking you to sign in even after it says you’re connected, let us know which game you’re using and what message appears on the screen. That would help narrow down the problem.