DNS has nothing to do with your Arduino…
It’s used to pair a ‘hostname’ up with an IP address on your network.
You need to understand how your network operates to use host names.
A host could be your tv, dog kennel or washing machine.
The Arduino simply exists at a known. IP address, and the network knows how to cross-reference it.
Ports are important when it comes to reaching a particular service on your host… e,g. a web server often lives on port 80, other services reside at other port numbers.
It’s worth learning and understanding.