Lots of great coastal towns on the Costa Brava. Been to both Cadaques and Palafrugell (Calella de Palafrugell is the town on the coast). Both lovely but Cadaques, while further afield and somewhat isolated outside of Port Ligat , is an absolute gem of a town. We stayed 10 days in Cadaques and adored it. Great restaurants, shopping, bars, hiking. Beaches are rocky/'pebbly' but that's pretty common for Costa Brava. You can take a ferry over to Roses and get to Figures and into France in under an hour by car but you need a car for Cadaques.
We did not stay in Palafrugell but visited. The coastal part is lovely spot, the larger town is fun as well but not as charming. We rented a house outside of Begur (about 15 minutes from Palafrugell) with a view of the Med and loved it. Begur is offset from the Med and a small town but more than fit the bill for us - pedestrian center, plenty of good dining etc. You can do more 'town hoping' (by rental car for us) on this part of the Costa Brava rather than Cadaques and get to sandy beaches (and rocky ones) very easily and hiking the Cami de Ronda (coastal trails) is magnificent! Girona, Cadaques (90 min), Figures (60 minutes), Pals (15 minutes), Peratallada (15 minutes) are all day trips.
You can't go wrong with either location and the Catalan people have been nothing but warm and welcoming to us regardless of where we stayed or visited...so many options, so little time.
Not sure of your budget and how many people you are traveling with but may have a rec based on your answers.