To expand on bartamos’ suggestion, if you have a non vented gas cap or the vent is plugged your gas tank will build vacuum and not allow fuel to get to the fuel pump. Setting for a few minutes will relieve the vacuum enough to restart. You failed to mention if upon restart the engine keeps running til you shut it down or if it dies again in 20 minutes.ðŸ›