Hi @joshuamatias,
Does it also do this when the charger is connected?
Things to try that may resolve the problem:
* [https://www.infofuge.com/wipe-cache-partition-redmi-note-8-pro/|Wipe the cache partition] and check.
* Try using the phone in [https://www.hardreset.info/devices/xiaomi/xiaomi-redmi-note-8/safe-mode/|safe mode] and check if it works OK. If it works OK when in safe mode, then a ''downloaded app'' may be the problem. The trick is to find out which one. You will need to uninstall each downloaded app, one by one and test the phone in normal mode between each uninstall, to see whether it worked OK or not. When it does then the last downloaded app the was uninstalled was the culprit. A downloaded app is one that you downloaded and installed and was pre-installed on the phone when you got it.