I suggest you try a different charger first. Turn off developer options in settings. However, if the problem persists, I suggest you contact Samsung Service.
Hello friend, we are sorry to hear that,
can you please try a different charger cable, if it still didnt work, we advice you to visit the nearest service center with phone to be checked.
thank you :)