On our first cruise, we stayed only one night in Barcelona in advance of the cruise, booked through
DCL at their hotel selection (Le Meridien on Las Ramblas). We just walked around that first day up and down Las Ramblas and down to the port (not the cruise port - just a little farther along) where they had shops and restaurants. Spent some time drinking sangria and relaxing there and walked back. DCL transfers the next morning. That trip we flew Toronto-Barcelona and after the cruise Barcelona-Munich to visit family and then Munich-Toronto. Toronto-Barcelona and Munich-Toronto were booked on one ticket as a multi-city flight. We tried buying a one-way ticket for Barcelona-Munich but the price was insane (more than double a round trip ticket which makes no sense but that's what they do) so we purchased a roundtrip ticket Barcelona-Munich and only used the first leg.
Second Med cruise, we flew Toronto-Munich to visit family and then Munich to Barcelona and stayed one night in Barcelona in advance of the cruise, booked through DCL at their hotel selection (Diagonal del Mar). We didn't go out - there wasn't much in that area but the pool was on the roof along with a bar so we spent some time up there. Great views but we were too tired to go anywhere. Fantastic dinner at the hotel restaurant (best ribeye steak I've ever had). After the cruise, we stayed 3 nights at DCL's hotel selection (Renaissance International that time) and booked two tours through Viator but the arrival day we just walked around (we were close enough to walk back to Le Meridien where we'd stayed the first time to go to their restaurant Cent-Onze which we loved). One tour was a small group food and wine tour in areas around but outside Barcelona and one was a day-long tour through Barcelona. We went back to Cent-Onze for lunch (we had 2 hours on our own) on that latter tour. We then flew Barcelona-Toronto. We booked Toronto-Munich and Barcelona-Toronto as a multi-city flight and booked Munich-Barcelona as a separate flight. That latter flight was a roundtrip flight but we only used one leg because we were using points and it wouldn't let us book one-way. As with the previous time, we tried buying a one-way ticket but it was more than double the price of a roundtrip so we just booked the roundtrip with points and only flew the first leg.