Iron, and to a lesser degree, steel, can only become magnetised by passing an electrical current through it (an electromagnet). So a steel ship does not become magnetised in the accepted sense during construction.
However, any large mass of iron will affect the accuracy of a magnetic compass, causing it to deviate wildly from magnetic North. This problem was encountered when iron ships were first constructed in the mid-19 Century. It was overcome by mounting the compass in a 'binnacle', a housing containing two large soft iron balls either side of the compass itself, which counteracted the effect of the hull and balanced the compass so that it read correctly