In Shankar's quantum mechanics book he says the spin of electron doesn't change the energy levels of hydrogen atom(page 397, 2nd edition). How doesn't spin(being a form of angular momentum) change the energy levels? The total Hamiltonian has a piece for spin.
If we only account for the coulomb interaction which is the strongest one relevant to the hydrogen atom then the Hamiltonian won’t have any spin dependence. But that’s only an approximation, a very good one nonetheless.
However, if we look carefully enough we see that you are right. Energy does in fact depend on spin. For further details, look at spin-orbit interaction, a relativistic effect. But this is small compared to the coulomb interaction energy. To be precise, $\sim 10^5$ times smaller. This extra energy due to spin-orbit causes the spectral lines to spilt. But only when looked at with enough resolution. Hence it is also called as the fine structure.
Electron spin does not appear in the Schroedinger equation. It does not affect it's single electron solutions. Many-electron solutions are affected only via Pauli exclusion. However, the Schroedinger equation is a non-relativistic approximation. In the Dirac equation spin impacts the solutions.