1) Typically, you only have one port listening per application.
2) If you want multiple programs to run on a single machine you would need two Network Interface Cards (NICs) with two different IP addresses listening for the same port #. One program would go to one IP address for one application and the other would go to the secondary IP address (same port numbers, different IP addresses).
This is why ports exist so multiple applications can exist on the same machine and communicate different information.
Same question was asked on stackoverflow:
Can two applications listen to the same port?
Define Dynamic Ports
Dynamic ports—Ports in the range 49152 to 65535 are not assigned, controlled, or registered. They are used for temporary or private ports. They are also known as private or non-reserved ports. Clients should choose ephemeral port numbers from this range, but many systems do not.
The private, or dynamic, port numbers are used by clients and not servers. Datagrams sent from a client to a server are typically only sent to well-known or registered ports (although there are exceptions). Server applications are usually long lived, while client processes come and go as users run them. Client applications therefore are free to choose almost any port number not used for some other purpose (hence the term “dynamic”), and many use different source port numbers every time they are run.
If this is helpful please mark as correct answer.