Search for applications with “firewall” keyword.
On Windows 10 – You will need Windows Defender Firewall with Advanced Security.
Click on “Inbound rules”, and on the right pane, select “New Rule..”.
If you want a specific port to unlock, select the port option. Select the correct transport protocol and port number on the next step
You can name your rule. It is recommended to choose a name, that describes the application which uses this port.
Your port now accessible on your local network. If you want to unlock a port to the Internet, you need to set up a port forward in your router’s settings.