Certain Androids can get really warm.
Try not to use your phone while you're charging it and don't use high CPU-sucking apps, like Instagram, Facebook or games like Fortnite, for long periods of time.
If it starts getting warm, give your phone a break. Device overheating can lead to slow interface, battery drain, force close of mobile apps and defects.
If you aren't doing the things and your device gets hot or warm from basic use or charging; this may be the results of a device defeat.
Call the manufacture of your device (Samsung, Apple, LG) and seek professional diagnostics and replacements.