The main function of heavy cavalry is to contain the light cavalry of the other side, while the light cavalry is mainly used to attack the other side.
In frontal combat, no cavalry is an opponent of heavy infantry. Heavy infantry is the core of an army in the era of cold weapons. When the heavy infantry dispersed, they were defeated.
Of course, there have been some eccentric cavalry in history, such as Jin's turned horse, but the shortcomings are too obvious and not mainstream.