A Galaxy S7 is a six year old phone, it's likely the battery has failed. All smartphone batteries will age and eventually fail completely, that's inevitable. If you're comfortable working on your phone's hardware, and have the necessary tools, the iFixit site has a nice tutorial showing you how to replace the battery yourself:
https://www.ifixit.com/Guide/Samsung+Galaxy+S7+Battery+Replacement/90299
Otherwise, given your S7 is a bit dated you should weigh the costs involved to have the battery replaced by a service shop vs. putting that money into helping pay for a new phone.
Of course the problem may not actually be the battery, that's just supposition based on how old your phone is. But whatever the case may be, it's probably time to give serious thought into getting a new phone anyway.
Edit: Oops, my error. Just noticed you have a Galaxy S7 Edge. My comment still applies though, that's also a six year old model so not surprising if the battery is the problem.
https://www.ifixit.com/Guide/Samsung+Galaxy+S7+Edge+Battery+Replacement/105877
If you do opt to have your phone looked into at a service shop, get an estimate first. Putting money into keeping a dated phone working might not be your best option.