HELP!!!

So I have had the no start issue for about 3 months. It started off by just doing it every once in a while now the car will make like a jerk and cutout, and then a few miles later completely lose power. When I try to start the car it makes a noise like it really wants to start but does not. I thought it was the fuel pump relay so I went and bought a new one today. I plugged in the new one everything worked fine. I drove it for about 6-7 miles when it cutout and jerked!! So I turned around as fast as i could, and tore *** for home it died like 2 miles before my exit. I sat for about 20 minutes and it wouldnt start. So I got out and popped the new relay out looked at it for a while to see if there were any issues. Decided to put it back in, and it started right up!!!

Then on the way home it cut out again but did'nt lose power so idk whats wrong with it!!!

Please Help