Hello,
Please verify that you meet the following criteria:
To connect to a remote PC, that computer must be turned on, it must have a network connection, Remote Desktop must be enabled, you must have network access to the remote computer (this could be through the Internet), and you must have permission to connect. For permission to connect, you must be on the list of users. Before you start a connection, it's a good idea to look up the name of the computer you're connecting to and to make sure Remote Desktop connections are allowed through its firewall.
If you need to connect to your PC from outside of the network your PC is running on, you can use port forwarding or set up a VPN. For more information, seeĀ Allow access to your PC from outside your PC's network.
Below are two links that detail common connection errors for your reference. If you have any further doubts, feel free to let us know.
General Remote Desktop connection troubleshooting - Windows Server | Microsoft Learn
Troubleshoot Remote desktop disconnected errors - Windows Server | Microsoft Learn
Best regards,
Karlie