If both fishes and ship has the same shape, then why does the ship float and the fish is in the water eventhough the ship is hevier than the fish?
You are connecting two different concepts.
1. Both fishes and ship have the same shape : This means that both of them have a streamlined shape so that they move in water with minimum resistance. This has nothing to do with float or sink, this relates to the viscous drag force
(in simple words-liquid friction)
2. Ship floats in water : Archemedes' principle. The weight of the water displaced by the ship is equal to the weight of the ship, which causes the ship to float in water.