The modifier mirrors around the object origin.
Either move the origin to be on the centre line or
Add an empty on the centre line and in the modifier setting select that to be the ‘Mirror Object’ or
In the modifier settings select the correctly mirrored object to be the ‘Mirror Object’
The Mirror Object overides the objects origin as the mirror line.