Why does my phone keep restarting and how do i fix it?

A

AC Question

This is relatively new. I've had the samsung galaxy s5 for approximately a year now, and it only just started with its issue in the past two days. It restarts over and over again and i cannot do anything until i plug it in. Earlier i thought maybe it was because the battery was low, but now it is at 95% and continues to restart.
It is not because of a system update, because that has finished and it is still doing it. I'm thinking maybe it has something to do with the camera? Because my phone will let me text, but when i open camera or gallery, that's when it decides to restart. It is okay for about 5-10 minutes off of the charger, longer probably if i am not using it, but then as soon as i start using it, it restarts again.
Do i have to go into a store to get this fixed, or is there something specific wrong with it that i can fix on my own?
I'd really appreciate some feedback because i'm irritated that i'm not able to use my phone if i really need it.