[SOLVED] Loss of power keeps corrupting my Raspberry Pi 4’s operating system. How do I stop this?

techflame700

Commendable
Nov 30, 2018
116
0
1,590
I’m a real noob when it comes to Ras Pi stuff so bear with me. So, I install Ubuntu on an SD card and everything works great, until I slightly bump the table and the screen goes black. Turns out the USB C plug moved very slightly to cut off the power. I turn it back on, and it won’t boot with 2 red LEDs staring at me. I reformat the drive and reinstall the OS. Everything goes great until I go to plug a USB drive into it and the force of me plugging it in caused the same issue. I wasn’t even doing anything on the machine at the time it was completely idle. Is there a way to fix this? I am getting really tired of losing all of my programs and OS settings and having to constantly reformat. Thanks!