Reminded me of my marriage and my ex. He did the same thing to me. Some people are covert narcissists with personality disorders. I discovered my ex was one, and there were a number of things he did, signs I missed which showed me who he was. I missed them. He cut off sex in the same manner, disinterested in being intimate or doing anything with me. Instead of allowing him to destroy me, I left for 6 months. He begged me to come back and did the same thing when I came back. I cultivated my relationship with friends, hung out, flirted with other men to ensure I still had it and to confirm I’m not crazy.
Men like that are predators. They mimic what we need them to be. They make us fall for them, and as soon as we start seeing them for who they are they lose interests. There were probably signs you missed. Study, what went wrong, heal, and move on. Don’t let him control you another day.