MacBook Air m4 overheating.

If I constantly game on my MacBook Air, it's gets really hot, I was wondering if this could cause any damage long term.

Edit:also if I plug it in will that make the battery degrade less