Narutally depression can come from unhappiness, but that unhappiness can come from a feeling of stagnation. You do the same things every day whether it's wake up in the same room, talk to the same people, do the same hobbies, work at the same place etc. every single day until you feel burnt out from your everyday life. It's like playing the same video game 24/7 that was fun at first but now feels boring. You need new stimulus for your life but you're so bored and burnt out from the stagnation that it can be difficult mustering the energy to persue or even think about said stimulation. You life can feel pointless and empty since there is no progress or change being made in your life.
But that's just one way to feel depressed.
But that's just one way to feel depressed.