Could be a bad battery. Did you have Samsung replace the battery? I usually ordered a couple of replacements at a time for my old Note phones in case one is bad, but of course I had removable batteries for those phones. I've also replaced so called "non-removable" batteries myself on some of my devices. It wasn't too hard - just takes a lot more time. Good OEM replacements are pretty cheap on Amazon - but make sure you get a reputable brand since there are fakes out there that do not mAh as they say they do.
The phone may need to calibrate itself to the new battery. Typically this involves completely draining your battery and charging to 100% with the phone off, then starting the phone. Some people say you should clear the cache partition before this process. Others claim they have had success with apps designed for this purpose, or entering the short code "* # 0228 #" into the dailer. Here's a link I found for that process:
https://duopc.com/how-to-calibrate-the-battery-of-the-galaxy-s6.html
Good luck and let us know what works for you!