Please use Newton's law and kinematics related knowledge to obtain the law of conservation of mechanical energy through theoretical derivation

Please use Newton's law and kinematics related knowledge to obtain the law of conservation of mechanical energy through theoretical derivation

Take free fall as an example
Suppose that the object with mass m falls freely from the place with height h, the acceleration is g, the time taken is t, and the velocity at the moment of landing is v
According to the sports related knowledge:
h=g*t^2/2.
Multiply both sides by Mg
mgh=mg^2*t^2/2.
also
gt=v.
Substituting the above formula, we get the following result:
mgh=mv^2/2.
This is the law of conservation of mechanical energy in a free falling body