After crash, Ubuntu is Extremely unstable

So I was setting up Pocketmine-MP on my Raspberry Pi 3B +, but I ran it and my entire Rasp Pi crashed. When I start it up again, I get the rainbow screen, then the normal warning I get all the time, then it restarts. Sometimes I get the yellow power icon and a warning, sometimes it boots up. When it does though, it normally crashes very soon after booting. I've reinstalled Ubuntu Mate, same result. I've formatted the microSD card and reinstalled it, same result. At this point, I kind of want to give up on the Raspberry Pi as I've had so many problems with it and when I finally get it working, it CRASHES. AAAARRGGGHHHH!

If this is supposed to be some sort of query, I suggest you start with a better PSU (since you get power warnings at times).
I'm running Ubuntu Mate 18.04.03LTS with no problems (except of my own making).
I cannot think of anything else to try, except other SD cards, without some clues as to hardware.
Derek

+1 to trying a better power supply. AC chargers are much better then phone chargers for example, and definitely don't plug it into another USB device (like a computer or TV).

Power fluctuations can cause the CPU/board to be unstable... eventually corrupting the SD card.

i get power alerts from using keyboard and mouse. My solution was to use a high quality USB hub. Later I figured out using a powered HD plugged into the USB also helped. For some reason the wireless mouse uses a lot of power. Never had power alerts when using headless though. Hope that helps some. Try a corded mouse if you aren't using one already. Make sure your transformer is 2.5 amp or higher+
Also make sure you have a high quality SD card PNY ones have performance issues according to the guys at Armbian. I bench marked my SD cards for them I'll see if I can locate that thread
Found the thread but info is missing. It is several pages shorter now? You could ask Igor at the Armbian forum for SD card benchmarks