Hi R O,
Thanks for sharing those details. To narrow this down, could you confirm whether you’re using a personal Microsoft account or a work/school account? Also, are you resetting the PIN from the Windows sign-in screen or from Settings, and do you see an exact error message when requesting the code?
In the meantime, select Sign-in options on the sign-in screen and check whether you can sign in with your Microsoft account password instead. Please also make sure the PC is connected to the internet. If possible, try a different connection, such as Ethernet or a mobile hotspot.
If you can sign in with your password, go to Settings > Accounts > Sign-in options > PIN (Windows Hello) and try resetting the PIN there. If the text code still does not arrive, check whether Try another way is available so you can use an alternate email or Authenticator method already linked to the account. It may also help to contact your mobile carrier and ask whether automated or short-code verification messages are being blocked.
Please let me know what happens when you try the password sign-in and whether another verification option appears.