Xbox series S cold turn off

My xbox series s is turning off by itself while playing games, and when i turn it back on a “This xbox console was designed to turn off when overheated” message appears. The thing is, the console is not even that hot when i touch it, so i’m not sure if it’s actually overheating or not. For context i have this console since 2020 and never opened it or cleaned it.