NTA he should be a little more stable, but your lack of communication is also at fault. At the end of the day, you did have feelings for him, he was trying to convince you that you should break up with your bf, and you unblocked him. So in a sense, he is right to feel upset for your actions. However, threatening is not ok. Ultimately, your lack of communication/ and additional communication with X is what set the relationship to fail. He was just the one to “break the camels back”.
You just need to ask yourself. Did you leave because you wanted to go or did you leave because you found something better? You have the right to break up and date whoever, but you need to respect the other person. It’s ok, not understanding your feelings and what you should do. However, that’s is why you need to communicate these things. I think if your ex-bf knew about the whole situation (being clingy, and relationship with X) and you communicated with him, he wouldn’t have acted that why imo