It's difficult to pinpoint the exact reason for your ex's behavior without knowing him personally, but I can offer some possible explanations for his actions:
Fear of commitment: Some individuals, regardless of age, struggle with the idea of committing to a long-term relationship or marriage. As the prospect of marriage becomes more real, they may experience intense anxiety and back away.
Emotional immaturity: Age doesn't necessarily correlate with emotional maturity. Your ex's behavior may be a sign of emotional immaturity, making it difficult for him to handle the responsibilities and commitments that come with marriage.
Insecurities and doubts: He may have lingering doubts about himself or the relationship, which resurface as the relationship reaches a more significant milestone like marriage.
External pressures: There could be external factors influencing his decisions, such as family or friends expressing their doubts or concerns about the relationship.
Avoidance of confrontation: He might be uncomfortable expressing his doubts or fears directly, leading him to back out suddenly instead of discussing his concerns with you.
Unrealistic expectations: Your ex may have had certain expectations about marriage and the relationship that aren't aligning with reality, causing him to panic.
Commitment issues: He could have a pattern of struggling with commitment in relationships, leading him to push people away when things get more serious.
It's important to remember that relationships are complex, and individual motivations can vary significantly. If this pattern continues to repeat, it might be best for you to prioritize your own emotional well-being and consider whether this relationship is truly healthy and fulfilling for you. Open and honest communication with your partner is essential, but ultimately, both parties need to be willing to work on the relationship for it to succeed.