– What phone?
– How old?
– Did it do this always, or is it a recent change?
– What is “frequently”?
– Do you run an antivirus on the phone?
– What OS?
– What temperature is “overheat”?
– How long does it take to go from from a full battery to an empty battery?
– What do you do usually use the phone (can vary from for example “just waiting for incoming messages” to “always gaming”?
– Is there a relation between what you do and the temperature of the phone?
– Are all apps on the phone from the Play Store or App Store, or did you install apk’s from other sources? If so, which apps?
I agree that there is far too little information to accurately troubleshoot. I would first check to see if you can see any “dust bunnies” that are clogging the case vents. If not, have the phone evaluated at a local repair center. Most shops will offer a free or discounted bench test to get the phone evaluated and an estimate to repair.
If you are watching several videos in a row, that could be a potential suspect. Running videos on a phone uses a lot of internal resources.
Maybe your phone is old and the battery needs replaced or you need a new phone. Maybe the outside temperature is super hot and your phone overheats and shuts down. Maybe you use your phone too much and it overheats off usage or your phone is in your pocket and it accumulates heat that way.