Macbook Pro Keeps Shutting Down Randomly
My Macbook pro keeps shutting down randomly, usually when I'm using several programs at once. There doesn't seem to be any other correlation, sometimes it will go an entire day without shutting down and sometimes it will shut down within a couple hours of turning on. Has difficulty ejecting a USB occasionally as well - I always have a small USB inserted into the 3.0 port because that is where all my files are stored as to not overwhelm the computer. I usually do not shut down the computer often but recently have been trying to shut down the computer at night in hopes that would resolve the issue but it has not.
The process usually occurs as such: the computer freezes, turns black (but not pitch black), apple logo is still lit, computer is still running, and after a couple minutes the screen goes pitch black and computer shuts down. When I press the power button, the computer turns on like normal and works fine. This has been happening for a couple weeks now and it's sad that a computer that's not even 4 years old malfunctions like this.
MacBook Pro (Retina, 13-inch, Late 2013)
macOS High Sierra, version 10.3.2
Processor: 2.4 GHz Intel Core i5
Memory: 4GB 1600 MHz DDR3
Startup Disk: Macintosh HD
Graphics: Intel Iris 1536 MB
16.62 GB available of 121.12 GB.
When running activity monitor, at least 3.00 GBs of RAM is being used at all times even when less than 5 applications are open (usually google chrome, Microsoft OneNote, VLC player)
I called Apple Support and they did a power restart, short term memory reset, and reinstalled OS but nothing worked so far. Does anyone have any ideas what could be wrong or how to fix it? I'd really rather not spend another 2k on another computer and don't really have the option to give up my computer for a couple days either.
Thank you in advance
MacBook Pro (Retina, 13-inch, Late 2013), iOS 10.3.2