It can be a faulty charger, socket. If you use a non approved Samsung charger or plug then it could be that the wire is causing damage to phone itself or you may have accidentally misplaced your charging cable for a data transfer cable
Hi I still got the original charging cable and block. This charging issue had happened to all my previous Samsung smart phones. S7, Note10, Mega to name but few. I am a huge fan of Samsung electronics. Fridges, TVs, smart plug. But am beginning to loose faith.