2014 Nissan Sentra note died on me at a stop light, would rollover but not stay. Then eventually started and I could get off road. It was struggling to idle for a bit, a day later I started it and it started fine and didn’t struggle like before. It’s always idled really low rpm’s. Only 90k miles on it. Is it a fuel pump or something else?
You can get a rough idle or an engine stall for many reasons. Even a bad o2 or exhust leak can cause those type of issues. Before you blindly throw parts at it you are going to have to get the obd2 port scanned for any pending or current codes and if non now then you would need to find what sensors are acting up or pausabily causing the rough/stall condition. Honestly if you aren’t mechanically include I would just take it into a shop.