You know, this is yet another one I can't come close to explaining. I used to curse a blue streak, curses were every other word and if it was a long one we put one in the middle between syllables.
Like drinking and smoking, I grew out of it somehow. I occasionally curse now, it feels wrong coming out of my mouth. At work once I cursed, in an office where cursing is commonplace, and folks were shocked, indicating they'd never heard me curse.
I'd say for me having children could have been the impetus. I think more than that it is some kind of reason, the reason needs to be bigger than the issue.
Now f word or s word or freakin or whatever....they are like tofurkeys or veggie hot dogs to me. An indication that you aren't really ready to switch, you still need to hold onto something.
I'm not saying cursing is evil, it just completely looses its effectiveness if it is used all the time. There are lots of words out there, practice using all of them.
We had a thread, a debate on cursing here once, twice, whatever. Mostly what you resist persists, if we banned it, it would be an issue. Not making it an issue eliminates 99% of it.
Your awareness and interest to change is the first huge leap, the rest is continued awareness and interest, and time.