It could be any of the following:
- AC outlet doesn't work. Have you tried other devices in the AC outlet?
- The AC charger doesn't work. Have you tried other chargers or battery packs?
- The cable between the charger and phone is defective. Have you tried other cables?
- The phone is defective. Unlikely but could be a possibility.
what @LongHiker said, it could in some rare cases be software related issue as well but i've seen more hardware issues with this sort... if you think it's a software related issue, report the issue using Samsung Members app if you can manage to keep the device powered long enough to register one... or go on samsung website for help.