how can metal ship float on water even though metal's density is more than liquid
Whether a body will float or sink depends on the density of the body. Density of a body is the mass divided by the volume of the body.
Density of an iron rod is more than water so it sinks. The density of a ship is mass of the ship divided by the volume of the ship. Although the ship is made of iron, the volume of the ship is so huge that the density becomes less than the density of water. The reason being, ship is not a mass of solid iron. There are lots of empty spaces and other less dense substances within the volume of the ship.