When one stumbles upon the words ‘Discretized solution’, one is inclined to think of Quantum Mechanics. In quantum mechanics, the following are fundamentally discrete:
- Electric charge
- Weak hypercharge
- Colour charge
- Baryon number
- Lepton number
- Spin
BUT not energy. One only finds discrete spectra in bound states or where there are boundary conditions.
Discrete spectra and Boundary conditions
Consider a string that is clamped at x = 0 and x= L undergoing traverse vibrations. And you would like to know the motion of the string.

Maybe you know a priori that the solutions are sinusoids but you have no information on its wave number.
So you start trying out every single possibility of the wave number.


The important thing to understand here is that If there weren’t any boundary conditions that was imposed on the string then all possible sinusoidal wave would be a solution to the problem.
But the existence of a boundary condition ruins it.

This is the case with energy as well.
If
you have an electron in a hydrogen atom, there are only specific energy
levels it can be observed to occupy when its energy is measured.But
if the electron is unbound because its energy exceeds the ionization
energy of the atom, then it’s in a scattering state and its energy and
angular momentum have continuous spectra.

The solution of the Schrodinger equation for the hydrogen atom
Sources and more:
Solution to the wave equation by method of separation of variables
Brain Bi’s answer to ‘What quantities are always quantized?’
Mathematical Methods for Physicists( Chapter – 8), George B. Arfken, Hans J. Weber, Frank E. Harris