Port and harbor are similar but different.
A harbor is a geographic feature: a sheltered part of the coast where ships can safely anchor or dock.
A port will contain one or more harbors, but it's a larger concept. In addition to the harbor(s), a port also includes the docks, the unloading and cargo storage operations, customs, etc. It can even refer to an entire city. For example: "Miami is a major port for the cruise industry."
Hope this helps. Have a great day!