How do you stop codependency?

I wasn't a very insecure person before we met, I've always been considered a strong independent woman by others. Yet I loose myself in relationships, I get scared to loose the person I'm with. This time it's much worse, obviously part of it is also a traumabond . Weird tho because when I was single I was always content with that and didn't want a relationship. So my questions are:

Why do I become codependent? How do I stop being codependent on him?