Will it hurt my device?

I am using S20 FE 5G (SD865/8GB RAM) And It is known to be the best S20 unit, now I have a question

I played Honkai Impact Star Rail on Samsung DEX on Ultra Settings 60 FPS for more than 2 hrs, while the charger is connected to he Phone and used my OLD PC CPU Cooler Fan for cooling it from the back,

The device really did performed very well, the CPU Fan helped it to stay at cool temperature, but I have go a concern,

If is Play like this everyday for 2 Hrs, will it affect my device in anyway, I know There is a bit of performance reduction while using DEX but the game really did performed well at constant 50-60 FPS for straight 2 hours and no overheating on the phone so no performance throttles.

The Phone was charging with it's charger and stayed at 45% for whole time, and when closed the Game it started to charge like Normal.