Macbook Pro can't connect to internal hard drive even after changing the cable to the main circuit board So I thought my macbook's hard drive crashed last month when a folder with a question mark didn't allow me to use it. I got it replaced, but shortly after, the problem persisted. I thought it would be the connection between the hard drive and the main circuits, so i changed that wire. It worked again for a couple of hours, but then my computer froze and the question mark popped up again. I bought an enclosure and am now using it with my original hard drive that i thought crashed.  I have no idea what to do with my life right now. Classes just started and I need this piece of technology. Someone help me.
First step would be try the Apple Hardware Test or Apple Diagnostics, depending on whether your machine is pre or post 2013

Plug the machine into the mains power, boot then hold the  D  key until the test screen appears.