So I can't understand from where does the potential energy come
from?
The potential energy comes from the negative work done by gravity. The work done by gravity is negative because the direction of the force is opposite to the displacement. When a force does negative work on an object it takes energy away from that object. In this case, gravity removes energy you gave the object due to your positive work, and stores it as gravitational potential energy of the earth-object system.
The work you do on the object is positive because your force is in the same direction as the displacement. If the negative work done by gravity exactly equals the positive work you did, the net work is zero. This would occur if the object began at rest on the ground and you brought it to rest at the height $h$. Since the object begins and ends at rest, the change in its kinetic energy ($\Delta KE$) is zero and from the work energy principle that means the net work done is zero.
Now, since gravity took the energy $mgh$ away from the object, what did it do with it? It stored it as a change in gravitational potential energy ($\Delta U$) of the earth-object system. Note that potential energy $U$ is a system property. The object alone does not posses it and the earth alone does not posses it. It only exists when both the object and the earth are present. Thus it "belongs" to both.
Suppose that instead of you brining it to rest at $h$, you kept lifting it so that it had a vertical velocity $v$ and kinetic energy of $\frac{1}{2}mv^2$ at $h$ . In that case at $h$ there would be a change in potential energy ($\Delta U$) and a change in kinetic energy ($\Delta KE$). The $\Delta KE$ then represents the net work done on the object per the work energy principle, or
$$W_{net}=W_{you}+W_{gravity}=\Delta KE$$
why it is defined as work done by conservative force
Gravity is a conservative force because it is a force whose work is determined only by the final displacement of the object acted upon. In this case, the vertical displacement of the object. Note that it didn't matter whether the object had a velocity at $h$. The work done by gravity is still $-mgh$. The work that you did, on the other hand, was different if you brought the object to rest at $h$ than if you gave it a velocity at $h$. It didn't only depend on the vertical displacement. Therefore the force you applied is non-conservative. We can now rewrite the above equation as
$$W_{net}=W_{non-conservative}+W_{conservative}=\Delta KE$$
Since the negative work done by gravity only equals the change in potential energy
$$W_{conservative}=-\Delta U$$
Hope this helps.