A large ship can float but a steel needle sinks because of
Whether an object will float or sink depends on the Buoyancy force developed against the given mass of the object in water. Buoyancy force depends on volume of liquid displaced. the volume of water that can be displaced depend on the shape and size of the given object. If the size is bigger for a given mass then Buoyancy force also big and make the massive object float on water.