do you book your berth ahead of time? Or communicate via VHF and do all the booking just before you arrive ? Or do you dock the boat, and run in and do all the formalities? If so, how do you know which berth to dock? Or anchor off and dinghy in?
You have already answered to the most common scenarios and I can add that cellphones are also used these days. Many plotters also has harbour information stored in the charts. A good idea is to let your present harbour call the next you plan to enter for a reservation.
On any trip where I pull into a marina for the night, I call ahead in advance to ensure there is a slip, especially on weekends and holidays. Then when underway, if you are running a day or two behind (or early), they usually accommodate the change since I already booked with them. Usually, a few miles out I'll call on the radio to announce my arrival, and they either assign a slip then or I head to the fuel dock, fuel up and get the slip then. If you don't call ahead then there is no obligation on their part. I also try to use their facilities (ie store, ice, restaurant if it's good) this way they see you spend there also. If you make the same transits on a regular basis, then you become a regular and they will probably make sure to get you in. When I have run the east coast, I ususally try to stay at the same places (depending on the boat, as in speed wise) since it also works out for each leg of the trip.
thats what the internet is for. Do a search, make sure the marina/dock you are going to is suitable. don't always rely on someone else to do it. They may put your 20 m yacht on a commercial dock behind a container ship. Most of the telephone numbers are in the cruising guides or pilots. It is best to get the yacht secure for the night/week before worrying about the stresses of formalities. sometimes they can take days. If travelling a great distance, ie 1-2 weeks between countries then always keep your next dock/ agent informed of your new ETA. Talk to other captains about the best docks. we all love sharing information. It makes our job easier.