Chosen Solution

I recently replaced the housing on my phone after cracking the back glass. Everything is functionally flawless, except for the fact that it’ll just turn itself off randomly. Whether or not I move it, whether or not it’s plugged in, it’ll randomly turn off after a few minutes

If it restarts every 3 minutes it is more than likely a faulty charge port. You can confirm this by checking the error log; if it mentions “no successful checkins from thermalmonitord since wake” it will be a faulty charge port. Be careful when ordering a replacement as there are a lot of suppliers who are selling faulty ones that will end up giving you the same problem.