There's been some discussion about this on the forum and there's an FAQ about this.
Basically, some warmth during charging and extensive use is normal. However if the heat is significant (makes it unpleasant to touch) and persists even after you've closed apps and taken it off charge, it might be worth taking it to a care center.
Hope this helps,
Sometimes mine heats up a lot, when wifi is transfering data, for example... sometimes i don't know why... NOKIA 5 is a BRICK of a phone. It's HMD biggest FLOP. i should have bought a XIAOMI! :\\\\\