1996 Ford Explorer XLT

My gas was still a little above the red line but my gas light came on I have my truck warming up for about 5 minutes and all of a sudden it started puttting and when I would push on the gas it wouldn’t do nothing and then it turned off I thought I might of flooded it the next morning I went to turn it on and it started up I got about 4 blocks away and it started puttting again and turned off now it turns over but putts a few times and then turns off it will not stay running i put a quarter of a tank of gas