For the Remote Desktop Protocol (RDP) to work, you need to open these ports on your firewall or NAT device (Router, WIFI…).
And don’t forget to also forward these ports in your NAT router to your computer, or it will not work, because your router doesn’t know where to send the packets for your remote desktop.
Either this, or you use software like:
Altrough i prefer RDP that comes with Windows. It has more speed, is more stable and feature rich.
For example it automatically maps your drives, printers, clipboard, sound and so on…