Use a level to check that the metal door is straight. ...
The door frame should be slightly smaller than the opening it fits to allow for adjustments. ...
Shim between the side jambs and the studs to fill in the spaces between them.
On the hinge side, start with the bottom and top of the jamb. ...
On the latch side, shim at roughly the same places and at latch level.