Why am I so tired all the time?

Sometimes I’m ok with 8 hours of sleep, but it usually takes 10 for me to feel well rested. And even then it’s possible for me to still be tired throughout the day. Yesterday I had a slight headache which I thought might’ve been from hunger because I’m losing weight, but it wasn’t even hungry. I was shoveling food in my mouth all day to try to get rid of because I thought that might’ve been the problem but it wasn’t. I also noticed i felt a little lightheaded yesterday, which again, I thought it was maybe from hunger but i kept eating to try to make it go away. Eventually it went away on its own, but it didn’t get better after eating. I don’t know why it’s been like this! And yes, I still had this problem before losing weight.