My Xbox series x like to turn off by itself

For a month now my Xbox series x keeps turning off when playing games and I tried to see if it’s overheating so I moved it to a better spot I tried getting a battery backup and factory reset it and nothing seems to work please help me on what I can do to fix it

Where are You from? Better to find someone at your country for sure.
Postage can be pricely.