A ball has two forms of mechanical energy: kinetic and potential. Kinetic energy is the energy of movement, and it increases as the magnitude of the speed increases. Potential energy is the energy of interaction with Earth's gravitational field and it increases as the height over Earth's surface increases.
The formulas are `E_k = (m V^2)/2` and `E_p = mgH,` where `E_k` is the kinetic energy, `E_p` is the potential energy, `m` is the mass of a ball, `V` is the speed and `H` is the height.
Consider how the speed and the height of a ball change as it rises. The height obviously increases, so potential energy increases. But the magnitude of a speed decreases uniformly (a ball possesses uniform downward acceleration `g` due to gravity). So the kinetic energy decreases.
The answer: the potential energy of the ball is increasing as the ball rises.