I’ve noticed that whenever I plug my iPhone XS it almost immediately gets significantly warmer. I don’t recall this being an issue with my X. — Is this happening to your phone as well?
All devices with lithium ion batteries get warm while charging. If it's scalding hot, then it may be a problem. If it's just a little warm, you're fine.
My Xs Max is cooler charging than any phone I’ve had before. 8+, 6s+, 6+. When using MacBook Pro charger it gets warm but not hot. (Rapid charging). My wife’s iPhone rapid charges a lot. Mine spends most of its life on a wireless charger or plugged into the car. Mine never gets warm to the touch.