2013 Nissan Sentra - Dies

car starts hard and dies sometimes. I left for 4 aldays and I came back it wouldn’t start . sounds like it is not getting gas. after pumping petal several times it finaly started