Try running the Apple Diagnostics to see if any hardware issues are detected. On some systems the diagnostics are broken and will not run.
Besides a drive issue another common problem would be a possible memory issue especially if using third party memory (or a bad memory slot since the slot nearest the bottom case tends to develop issues due to cracked solder joints).
See if there are any Kernel Panic log reports in "/Library/Logs/DiagnosticReports". The Kernel Panic log file names will begin with "kernel" and end in ".panic". If there are any recent panic logs, then post several of them here using the "Additional Text" icon which looks like a piece of paper.
Try running the laptop in Safe Mode to see if it works any better. Safe Mode disables Login Items and all third party drivers (plus even some Apple drivers such as for the camera and advanced GPU drivers).
Disconnect all external devices in case one of them is causing the problem.
Does the issue occur even when using the charger?
Is this a 15" or 17" model? If so, then perhaps you are encountering known GPU failures common with those 15" & 17" models.