hi! fyi, here are a few posts that may be of interest
How would a medieval ship dock in a port? - featuring /u/jschooltiger and /u/mormengil
How did ships dock during the Age of Sail. - /u/mormengil & /u/MarcEcko
How would a historical sailing ship dock at a quay? - /u/mormengil
In Les Miserables, they showed a whole bunch of prisoners pulling a giant boat into a dock space. Did they really do this as punishment in France? How many men was required to do this? - /u/Talleyrayand & /u/jschooltiger
How did harbors work 300+ years ago? - /u/eternalkerri and /u/vampire_seraphin
if you have followup questions on locked threads, post them here & include the user's username so they'll get an auto-notification
A few different methods could be used. The first would have been simply using a minimum of sail. Maybe just the mains heavily reefed amd a small jib. Enough to let the helm answer and make small forward progress.
Another could be simply towing. It was perfectly common for a larger ship to send its boats out in a calm or congested area and for them to row the mother ship forward. Tiring yes but sometimes that's all you could do.
Another option is to Warp or Kedge. Kedging involved taking the ship's anchor out a distance, letting it catch, then pulling it in amd building forward momentum that way and repeating. While warping is essentially the same process but with fixed points on the shore like cleats or bollards.