Saying "exercise more" is the right answer, but at the same time, it's not like you don't know this already. The difficulty is to start, and then keep the habit.
Exercising will release endorphins, which will make you feel better, reduce stress, improve your sleep, keep a healthy weight, among other physical and psychological benefits.
To accomplish this you could set small goals and make a daily tracker so you can check activities you do, or how much time you spent on them. That way you will see progress, even if it's a small one, and you can celebrate every little victory.
Worst case scenario, if you really want to play games that badly, you could play stuff like BoxVR or BeatSaber, or dance games for consoles, or other interactive kind of game - this way you're still gaming, but not sitting down barely moving.
You can also start by setting really simple goals, like "5 push-ups". You may think "Five push-ups? That's nothing!". Well no. Five push- ups is five more than zero.
That is not nothing.
And once you start doing them, you may do 10 instead, just because you don't feel tired. But the goal is to do a minimum of 5 a day. Once you build the routine and are comfortably achieving your goal, you can implement more reps, other exercises, a run around the block.
You could meet up a buddy at the gym, so then you are accountable to someone else, or else you have to make excuses - nobody wants to make excuses and let their friends down, right?
You could start reading books. Any books that interest you. Forget school and their rigidity on what you must read and examine to exhaustion. Find some interesting book, fiction, non-fiction, anything, can even be comics/graphic novels, and set the same goals as with the exercise - 5 pages a day, every day (not much, but it is still 1825 pages instead of zero at the end of the year).
Or you could learn a new skill, try different things, see what's out there, don't dismiss people when they ask you out, just go, have fun, meet even if 1 new person, strike conversations with them. If you're out of ideas, just google what to do, youtube it, check recommended links from there - get creative!
The goal is to find something that ends up eventually being more rewarding than whatever you are doing in your game (and it's not always easy, since games are an easy escape to a life that seems boring and depressing).