Just found out i am 12 weeks pregnant

My periods r so irregular due to my last miscarriage in September so thought thats y i didnt have a period. Ive been smoking cigarettes until today when i found out and im scared i hurt my baby. Any info would be nice?