Some marinas in Croatia allow booking or making a reservation in advance (but they will charge you a certain fee for reservation).
In some marinas through online booking on their site you can book and fully pay the berth.
You can also book berths at majority of croatian marinas online via „mySea“ as well as at buoys and (restaurant) jetties. You just need to get a free application and register under www.my-sea.com. Recommendation in peak season is to book one day before. You can use the Euronautic code when registering at Mysea and then marina will already have all the necessary documentation of your vessel. You get the code in the ship's papers when checking in.
You can always call marina and ask how many vacancies are there available and when is the best hours to arrive. Finding a berth off the season is usually not a problem but it is a different thing in the peak season (particularly in July and August) when finding a berth may be a challenge, especially if you don’t set sail for the marina in the early afternoon hours.