It is normal for your phone to become warm sometimes during charging or when the phone is being used extensively (multiple apps being in use, watching long videos etc.).
If the phone doesn't cool down when you close your apps or take it off charge, or if it feels very hot (rather than just warm), please contact support.
Hope this helps.
Have a great day!