Then your phone is not overheating. It is using energy, and all energy use creates heat as a byproduct. It’s called the Second Law of Thermodynamics. Anything that creates or uses energy does so with some loss. That lost energy is expressed as heat. So when you charge the phone it generates heat in the power source, heat in the charger circuit in the phone, and heat as the energy goes into the battery. The faster the charging, the more heat is generated. Likewise when you discharge the battery; not all of the energy from the battery gets to the circuits that use it. Some of it becomes heat.
If you use the cellular network for voice or data, converting energy to radio frequency signals is very wasteful; only about 30% of the energy that goes into the network components comes out as radio signals. And the amount of energy used by a network connection is dependent on the strength of the signal; a 1 bar signal uses 10 times as much energy as a 4 bar signal.
Also, your iPhone 13 mini has an OLED screen; that is, the pixels on the screen are all LEDs, as compared to older phones that had back-lit LCD screens. Thus, the screen runs much hotter on an iPhone 13 than on LED screen phones.