Drives both HDDs and SSDs heat up when they are written to.
In the case of the HDD the head needs to alter the magnet state the given sector block with the data so the heads coil heats up.
In the case of a SSD a similar event happens as the SSD cell state needs to be altered. But it’s within a smaller space but is voltages level.
So your actions can push the drives heat up. Performance testing can be brutal!
Now also keep in mind the drives size and it’s free space also play a role here! Let’s say you have a 256GB drive and 200GB of the of the drive is used only leaving 56GB free so what can happen is the drives controller needs to move the more worn block in the free space for less worn blocks of the used blocks (wear leveling) which likewise is rewriting the blocks. While having 56GB of free space is not bad, the less free space you have the drive needs to work harder! If this is you boot drive that free space maybe under pressure as VirtualRAM, caching and application scratch space can also be a factor! Which gets into your usage.
I would recommend finding an App which shows you the wear level of your SSD. Unlike HDDs SSDs do wear out!
In the case of HDDs defraging the drive once and awhile can improve performance. While the mechanical parts do wear the data block hold up much better than a SSD.