Welcome to FT, lfy.
Generally speaking, you'll likely get more detailed info from the cruisecritic forums and they have threads for specific sailing people can get to know each other and share info before the cruise.
I haven't taken a cruise in Europe yet; just Alaska, Caribbean, and Mexico. I have been to Europe though.
We never book shore excursions through the ship. This is mainly because of price and we can usually find the same or equivalent excursion by booking ourselves. You do run the risk of the ship leaving without you if you don't get back in time but if you give yourself enough time, you won't have issues. Generally speaking, there seems to be tour operators offering excursions at all ports of call.
We've been to Nice and took a public bus to Villefranche, doing a milk train in reverse. Getting between the two is really easy as is getting to Monaco. We found Nice and Villefranche really walkable with enough do it yourself (just get a guidebook) things to see without needing to join an excursion. Monaco's train station is higher up so it's a bit of a pain walking around and heading back but you can jump on public transit.
Barcelona is also pretty easy and walkable too. The main tourist area is Las Ramblas which you can likely spend a lot of your time. For some of the other areas (eg. this mountain park with they olympic pool... great views of the city, Sagrada Família, etc), you can get around using the subway system.
Livorno is a bit aways from Florence. Might be handy to do a tour here. Again, you don't necessarily have to book one through the tour company. You can look into taking a train to and from Florence but be aware that Italian trains are notorious for not being on time so you need to give yourself lead time. Likely better just doing the circuit via coach. The core of Florence, where the key sights for a first-timer are, is walkable as no cars are allowed. If time is very limited, it might be handy having a guide.