In this answer I want to clarify the nature of the Work-Energy theorem. (The issue of the normal force exerted by the supporting surface has already been addressed in the answer by contributor Er Jio.)
To that end I will present a derivation of the Work-Energy theorem.
The starting point is Newton's second law:
$$ F = ma \tag{1} $$
The next step is to evaluate an integral: we integrate both sides of (1) with respect to the position coordinate, integrating from starting point $s_0$ to final point $s$
$$ \int_{s_0}^s F \ ds = \int_{s_0}^s ma \ ds \tag{2} $$
The work-energy theorem hinges on the fact that the two factors in the right hand side of (2), acceleration $a$ and position coordinate $s$, are not independent of each other; acceleration is the second derivative of position.
In preparation for developing the right hand side of (2) we need to do some mathematical operations.
In the steps starting with (5) the relations (3) and (4) will be used:
$$ v = \frac{ds}{dt} \ \Leftrightarrow \ ds = v \ dt \tag{3} $$
$$ a = \frac{dv}{dt} \ \Leftrightarrow \ dv = a \ dt \tag{4} $$
Going from (5) to (8):
First (3) is used to change the differential from $ds$ to $dt$, with corresponding change of limits. Next (4) is used - with change of limits - to arrive at (8).
$$ \int_{s_0}^s a \ ds \tag{5} $$
$$ \int_{t_0}^t a \ v \ dt \tag{6} $$
$$ \int_{t_0}^t v \ a \ dt \tag{7} $$
$$ \int_{v_0}^v v \ dv \tag{8} $$
The steps from (5) to (8) give the following mathematical relation:
$$ \int_{s_0}^s a \ ds = \tfrac{1}{2}v^2 - \tfrac{1}{2}v_0^2 \tag{9} $$
Notice especially:
The definitions (3) and (4), in combined form, are all that it takes to imply (9). The reason that (9) obtains is purely mathematical: in any situation where you have a quantity $s$, its first derivative, and its second derivative: the relation expressed by (9) obtains.
We use (9) to go from (2) to the work-energy theorem:
$$ \int_{s_0}^s F \ ds = \tfrac{1}{2}mv^2 - \tfrac{1}{2}mv_0^2 \tag{10} $$
We can think of the Work-Energy theorem as consisting of two components of different nature:
- The mathematical property expressed by (9)
- Newton's second law: $F=ma$
That is, the Work-Energy theorem consists of mathematical content and physics content, and the physics content is the relation $F=ma$
The left hand side of (10) is the definition of work done. As we know: change of potential energy is defined as the negative of work done.
$$ \Delta E_p = - \int_{s_0}^s F \ ds $$
The Work-Energy theorem, (10), is a statement in terms of integrals. We have that integration is inherently an evaluation from a starting point to an end point. That is, an integral gives a difference between a starting point and an end point. Therefore, if we shift the notation to $E_k$ and $E_p$ (kinetic energy and potential energy), we must do so in terms of a $\Delta$ of energy
$$ \Delta (-E_p) = \Delta E_k \tag{11} $$
It follows from (11) that as a system goes through dynamic change the amount of change of kinetic energy will always match the amount of change of potential energy.
$$ \Delta E_k + \Delta E_p = 0 \tag{12} $$
(12) is of course a statement of conservation; (12) implies conservation of the sum of kinetic energy and potential energy.
$$ E_k + E_p = C \tag{13} $$
We recognize the well known principle of conservation of Energy as a generalization of (12). In order for the principle of conservation of energy to hold good: all forms of potential energy must share this property.