IPhone randomly shuts off and shows weird scripts?

I have a problem with my iPhone 4S, it just tonight shut off randomly about 2 times. Each time it took about 15 minutes to restart. What It does, it does like as if the screen were broken, it does a flash and the next thing you see is the apple symbol. Most of the time It won't let me turn it off and back on. But if it does, it shows sometimes blue. Red. Or even green letters an they just run off the screen, and then there's writing on the top, like if you were starting a pc and it has the black screen with all the writing. Sorry it's late at night and I can't think of the word for it. But yeah, it does that while the apple symbol is still in the center of the screen. It's late at night. Hope this makes some sense

Hopefully your warranty hasn't expired. Take it to the Apple store. From my experience (and other people's experiences as well) iPhone 4s's get a lot of issues.

  • User tracking scripts. Good or Bad? What are user tracking scripts in internet browsing context. Are they good/necessary or bad/unnecessary? I have this app on my iPhone 5 that lets me block several user tracking if wanted to. So if I do block them will I get any benefit like better browsing speed?
  • My iPhone randomly shuts off? I have an iPhone 6 and lately it has been resetting on its own. I will just be texting someone or on Instagram or something like that and it will just go to the white screen with the apple sign on it as if my phone is turning on. It stays like that for about ten seconds and then goes to the lock screen. Why is this happening and is it a problem? My iPad mini also does this.
  • My Iphone keeps shutting off, but before it shuts off, my screen freezes and there's these lines that show up, they're random? My Iphone keeps shutting off, but before it shuts off, my screen freezes and there's these lines that show up, they're random. Sometimes there's this crackling sound, and sometimes the line move, my mom says its just the phone, but my dad says, its the proccecor and that its overheated, i have an Iphone SE rose gold 64 gb and my iOS is 12.3.1
  • My iPhone 4S shuts down randomly? I just got an iPhone 4S and I will charge it full but somehow I loose battery so fast and then when it's about 50% it just shuts down randomly I checked for updates it's said I have the latest update does this mean I have to restore my iPhone?