Are you using an Apple Pencil with the Scribble feature enabled?
Many anecdotal reports have been seen within this Community that have observed unexpected heating of the iPad when using the Notes App when the Scribble handwriting feature is used. Reports also indicate that disabling Scribble eliminates the increased generation of heat.
To disable Scribble from iPad settings:
Settings > Apple Pencil > Scribble - set to OFF
Your iPad will always generate some heat while it is being used - the principal sources being the CPU/GPU as the processing load increases (Scribble being a CPU-intensive process), the display (brighter screens generate more heat) and the iPad's internal battery charging circuitry.
It is not unusual for an iPad to become warm when being used - more so when using some types of iPad case. High screen brightness and/or CPU intensive Apps will also create more heat.
The key point is that whilst your iPad may become very warm in normal use, the iPad should not become uncomfortably hot to handle. If your iPad is becoming too hot to hold, you should take your iPad along to the Genius Bar at your local Apple Store - where the technicians can examine and test your iPad for faults:
Genius Bar Reservation and Apple Support Options - Apple