well something that serious you cannot gain back like nothing, it would take months if not years. there's a reason why it happened. if there is no reason then, in reality he is not really ready for grown up stuff.
If you mean literally yesterday and today then something happened that he doesn't want to tell you. If you mean gradually but recently then id say he really isn't ready for marriage and kids yet or is unsure. The only way to try and work it out is to talk about it. Either way, it's best to know now and not after you've been married and had a child.
You don't "fix it" Not knowing the time frame on his change of heart, he has lost interest in a serious relationship with you and or met someone else. You need to just move on and find happiness elsewhere