Have you made any recent updated that you are aware of on this device? If so try uninstalling them and check as updates as history of breaking this feature.
First of all, check if the remote computer is accessible from your device over the network, and the default Remote Desktop port (TCP 3389) is responding (and not blocked by firewalls).
Make sure the DNS address of the remote RDP host is correctly resolved from your computer. Use the following commands:
If the DNS name is not resolved properly, check your DNS settings or try connecting to a remote host using its IP address.
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–