Rail served harbours are cool, but can be a bit overwhelming if you've never done one before.
First of all there are so few ships available in HO that you really have to scratchbuild. For a large cargoship that's going to be impossible, since a model of a bulk carrier would in HO gauge be 2 meters long. You could however build coastal cargo and tanker ships, which would be around 70/50 cm long. Of course you'd have to learn a bit about model ship construction methods, ship design, ship operation, and model ship detailing first. That takes nothing but time spent searching the internet for photos and asking lots of questions on model boat building forums. For a pair of standard sized cargo coasters, assuming that the hulls and superstructure were scratchbuilt, I'd say it would cost you about $80 to $100 per ship in detail parts and materials. Then you'll want to add dockside features like bollards, cranes, bumper tires, harbour walling, warehouses, supply stores, repair shops, fuel tanks, distributor and trader offices, harbour masters office, maybe a few smaller boats here and there, which with the help of walthers would probably all come to around $800, excluding the ships. So that's $1000 you've spent so far, now you've gotta put water down. At about $2 per 10cm squared for decent stuff, I'd say you'd be looking at about $120 to cover your whole harbour area. So $1120, lots of time, and quite a bit of work will get you a complete harbour scene.
Reckon you're up for the challenge? If you are, I would be more than happy to save you a lot of time by helping you with learning ship design and by handing over whatever ship photos you would need for references, as well as my knowledge on model ship building. If not you better start thinking about what's going to go in it's place (IE industry).