Why does my Mac Book Pro (15 inch) keep randomly shutting down?

Mac Book Pro (15 inch) Keeps Randomly Shutting Down...

I got my Mac Pro in 2010/2011. It will shut down at random now as of about 6 months ago. There are certain websites and apps that I know for a fact that it will shut down if I access. Its a full shutdown and 90% after I enter my password to log in, it will shut down one more time. I can't put a finger on why it keeps happening. I have a brand new battery, as of 4 months ago, so its not the battery. However, after putting a new battery in the shut downs have increased. I know there are other threads on here regarding this but most of the answers that helped those threads out didn't help me out. I'm sure I should just take it to an apple store....but I really don't want to haha. Any hep would be great.
Re: Mac Book Pro (15 inch) Keeps Randomly Shutting Down...

I'm sure I should just take it to an apple store....but I really don't want to haha.
That's one obvious solution...and the one I'd opt for since you can easily replicate the issue.

Original thread: https://forums.imore.com/threads/why-does-my-mac-book-pro-15-inch-keep-randomly-shutting-down.315544/