Just my 2 cents, with slightly different opinions than many of the other posters:
If one of your favorite pastimes is laying in the sun, July is the better month. Perfect weather for that. Of course, it’s lousy weather for exploring old ruins, it’s crowded, and flights are their most expensive. The only cruise lines I know that offer topless sunbathing on the ship are German lines. AIDA for instance has a special, isolated adults only area just for that.
While July more crowded than April, the big sights (Rome, Venice) are jam packed crowded in April too.
To put things in Caribbean terms, the Nassau/San Juan/St Thomas route is Barcelona/Rome/etc. Of course, Rome is about a million times more interesting than St Thomas (IMO) but it’s still packed with people wearing cruise tour stickers and guides holding up paddles. Also, know that many of the most famous European ports, like Rome, are no where near where the ships dock.
If you want more off the beaten crowd, the Adriatic/Ionian is a great choice. Including much better beaches (IMO) But you are talking older, smaller ships usually. MSC has a lot of good options. And will likely be cheapest. But while the ship has everything in English (and other languages) most of your fellow passengers will not be native English speakers.
Another factor with Mediterranean cruises is they have more port days and fewer sea days. If not every port appeals to you, take a ship-in-port day or two.