First Step for Remote Desktop Connection
First you need to set your system or server to access over local network.
Add fix local ip address while connecting wifi or from tcp ipv4.
Then you need to open port forward using that fixed ip address in your main modem.
Then you check your local public ip address from searching on google. OR use this website https://www.ipchicken.com/
Then you can type that public ip address and port number in remote desktop connection to access any of your system using user name and passwer.
There are also some helpful settings in group policy for connection rdp.
3389 is default port for RDP. You can change it by choosing any ip which is not used in this link
before opening port then you can open port using the port number that you have added into your registory editor.
REGISTORY EDITOR LINK IS AS FOLLOWS.