What is producing the constipation ,are the Iron pills.
Discontinue the consumption of the Iron pills.
People who are not diagnosed , with Iron deficiency,should not supplement Iron,taking Iron when it is not needed ,does no good and may cause problems.
If the problem ,continues,you will need to consult a doctor.