Numerous ports worldwide are adopting automation to boost productivity and modernize their operations. At this point, smart ports become a more important paradigm for handling increasing cargo volumes and increasing operational efficiency. In fact, as ports become more congested and cargo volumes increase, the need for accurate navigation through seaports is more pronounced to avoid collisions and the resulting consequences. To this end, digital twin (DT) technology in the fifth-generation (5G) networks and drone-assisted data collection can be combined to provide precise ship maneuvering. In this paper, we propose a DT model using drone-assisted data collection architecture, called TwinPort, to offer a comprehensive port management system for smart seaports. We also present a recommendation engine to ensure accurate ship navigation within a smart port during the docking process. The experimental results reveal that our solution improves the trajectory performance by approaching the desired shortest path. Moreover, our solution supports significantly reducing financial costs and protecting the environment by reducing fuel consumption.