Overheating is only a concern when you see the thermometer screen on your phone indicating it is too hot. Otherwise it is working and maintaining within its expected operating temperatures.
You will experience extra heat and battery lag immediately after any software update. This usually lasts for about 3-4 days and Apple documents that behavior here:
About Apple software updates - Apple Support
And finally given you are referring to an iPhone 12 mini, you should check your Battery Health at Settings > Battery > Battery Health. If it is below 80%, it needs to be replaced. It would be very unusual for any iPhone 12 mini to be operating correctly on its original battery. Purchasing a phone or replacing the battery from a location that is not an Authorized Apple Seller can also be problematic, where the battery is not able to meet the demands and will produce more heat. There is no Software fix to that problem.