It is best to quit smoking/vaping before you get pregnant or as soon as you find out.

Still, quitting at any time benefits you and your baby.