Desire to do things I shouldn’t

I need advice.

This seems like such a teenage angst problem but I’m in my late 20s and pregnant with my first.

My whole life I’ve always had desire to do things I know I shouldn’t. Not anything specific as that’s changed throughout my life.

Before I wrote it off as “vices”

Like I’m an ex smoker and ex frequent drinker. But I fight the feeling of wanting to do these things I shouldn’t like the above.

Is there some underlying issue that I have? Idk. But I hate wanting these things because I want what’s best for my baby..

How can I fight the urges to do the exact things I know are bad?? Please help 😩