For your workouts to get the maximum benefit.
You need to drink before you work out and after.
The same thing happened to me. I think it is a combination of dehydration and exhaustion. Take it slow and drink a lot of water. Good luck!
Are you eating well? It could also be cause you’re overworking yourself. Dont force yourself too much especially since you arent in shape.
I have to agree with everyone elses answer. Are you dizzy also? Water is your best bet. Even if you don’t feel like drinking water, just keep drinking until your urine is clear and not as yellow. Then go have a work out and see if your headaches continue.