I healed a lot of attachment issues and it is a lot of work you need to do, coupled with the healing that can only be done through relationship.
First and foremost, our attachment issues always start with our parents. Sorry about it. You are going to have to go into the pain of not getting what you needed in childhood. Even the best parents with the best intentions don’t always get it right.
Once you not only understand where it comes from, but also free up some of the emotional space it is taking up, you can begin the process of becoming very aware of the thoughts and feelings that come up when you become fearful or avoidant. This is probably the heaviest part of the work. You are going to have to question all of your thoughts and feelings. Having a therapist you are working with can be really helpful in this process because they simply can provide an outside perspective.
Let’s say you have a wound from being cheated on in the past, and your partner is not texting you back right away and you start to spiral. first, you need to take some deep breaths and regulate yourself. Then you need to start questioning. Has this person given you a reason to not trust them? do you still have feelings you need to feel regarding the last time you were hurt? What is the fear? Are there actually things you need to discuss with your partner? The more you are able to question, the more discerning you can be on what is your intuition and what is your wounding. A personal story: I still have anxiety that comes up when my husband works late. It is both that I think he is dead, or that he could potentially be cheating on me. I know exactly where those fears come from (thanks dad!), and there is literally no reason to believe that they would be true. I literally imagine those thoughts as a younger version of myself, and I visualize giving that part of me a lot of love. I am regulating myself by imagining me regulating with child me.
A big thing for me was going slowly in relationships and really becoming more aware of red flags. You are never going to find a perfect person, but there are things that will be an obvious issue for you. On the other hand, there are issues that can be resolved with communication. Us avoidant types don’t want to be in that process, but that process is important. Unfortunately, the only way that you can learn to be trusting in relationships by practicing being trusting in relationships.
TLDR: focus on healing and exploring with yourself first, then slowly work to be in relationship.