Soldering pins correctly is very important for a component to fit onto the mainboard, so you have to do it right.
Pins are supposed to be perpendicular (vertical) to the board. However, if the alignment is off by a millimetre or two, the component still might fit.
Try to fit the component in its place.
If the alignment is way off, you're going to have to desolder all of the components' pins.
It's a somewhat more demanding task than soldering, so prepare yourself for some work.
Once you have done so, use a stand for your component or ask someone for an extra pair of hands to hold it while you solder.
When you insert the pins and straighten them like they should be, firstly, solder the first and the last pin to the board.
That way, the rest of the pins won’t move, and it will be easier to solder them all correctly.