The collective noun for both cars and ships is 'fleet'.
a fleet of cars
a fleet of ships
The noun 'fleet' is also a standard collective noun for:
a fleet of limos
a fleet of lorries
a fleet of planes
a fleet of taxis
a fleet of trucks
That would be either a fleet, such as a
commercial fishing fleet, or an
armada, such as a naval armada.
It can also be a Squadron, for military ships.
A group of ships can be a flotilla, a squadron, a fleet, or an