Thank you for sharing about your concerns here.
It sounds like you are having a difficult time making sense of how your partner seems to be connecting and distancing from you. It is natural to want a consistent attachment and connection with your partner, and for you to feel disappointed and unhappy with how it seems to be right now.
I am wondering if you have been able to share with him about how you feel? Does he know that you are bothered by what is happening? Does he know what exactly it is that you would like to have in this relationship in terms of contact and connection?
If you are able to communicate your expectations clearly and still find that they are not being honored in the relationship, it might be easier for you to try and move on from the relationship. Maybe now, you feel stuck because you seek his understanding and wish to remain connected with him?
Have you been able to tell him, that "See, I feel confused and hurt when you distance all of a sudden and connect back again all of a sudden. I feel ignored and not important for you. I wish we could stay connected more consistently. I am finding it hard to trust your feelings for me. I would like if you are able to understand this and --------------------" - basically communicating your feelings and expectations clearly, without blaming him, in your own words.
Maybe having an open communication with him might help?
If you find that this is also not helpful, then I would invite you to think about what it is that is keeping you hooked on to him even after feeling disappointed, or wanting to move on? Is it your fear that you may not find someone else to build a healthier, more satisfactory connection with? Do you have other supportive relationships in your life? Thinking on these lines might help you in your attempts to move on from this, if that is what you seek.
Hope this gives you some direction.
If there is something you would like to share and explore further, to figure this out, I would encourage you to get in touch with an expert on the platform for sessions.
Take care and best wishes,