probably the system software is incorrectly installed due to some error, you can reinstall using Smart Switch on PC, or visit the nearest Samsung service centre to do the work for you, avoid using this phone to prevent any hardware damage.to downgrad...
possibly heat stops charging the device to prevent any damage to phone, hence the charging stops depending on the situation.try charging in a cooler place, preferably on a AC room to check if the problem persists. you may try to place the phone on a ...
check your speakers using the Diagnostics menu in Samsung Members app, restart the phone in Safe mode to check if the problem persists. If still unresolved dust might have accumulated to block the speakers, get it serviced at the Service Center.