Replaced fuel pressure sensor and now won't start

My check engine light was on. When I tested it the code it read wad fuel rail pressure sensor. I replaced that a few months ago not OEM part and the check engine light didn’t go off I was told it was because the part wasn’t OEM. At junkyard I picked up a fuel rail pressure sensor that was OEM. Put it in and it wouldn’t seal so I then removed and put back on the non OEM sensor now it won’t start it started before that I also just replaced the spark plugs & wires and coil. IT started after replacing everything and I drove it for 50 ft smelled gas stopped and turned off.