Hey,
There are few factors that you might want to investigate yourself before sending it to Apple.
- Your charging adapter (it is recommended that you use an official charging adapter from Apple)
- Your charging cable (genuine Apple charging cable is recommended)
- Your phone case (some phone cases are not good at dissipating heat, you should try removing them when charging)
- The environment (you should charge your phone in a normal room temperature)
- What you're doing while charging (running some tasks namely playing games, watching video may cause your phone to heat up, plus charging your phone does heat up itself too)
Note that your phone will not charge when its too hot, this is to prevent your phone battery getting damage.
If none of these help, please reach out to Apple.
To learn more about charging your device: Charge the iPhone battery - Apple Support