I used to volunteer at my school store so that I could steal cash and snacks
Why would you steal those things?
Lately, I was really depressed and I felt like doing something bad. Honestly, I was also hungry most of the time
If people find out you stole on the job then they won't trust you at the school. Even worse they may kick you out of school.
I didn't think about that and luckily no one found out.
From what I hear, it sounds like you are no longer at that school, so you have probably avoided any severe punishment.  However, I have to stress that stealing is wrong, and not just because of the risk of being caught.  I hope that you have learned not to engage in this kind of conduct in the future.