Don’t start replacing fuel pumps until you’re done what Iowaboy said:
check and I mean check every connection from the fuel tank to the motor, if you see any of them that look damp from a tiny fuel leak that means the primary pump can suck air there as well.
Air leak would always be my #1 suspect with those symptoms. Don’t be fooled into thinking an air leak in a hose is always easy to spot. I’ve seen them where the crack was so small that it was leaking air at a hose clamp without any visible fuel bleeding out. The leak was so small the fuel would evaporate so check very carefully at every joint or fitting.
Keep in mind, you can also have an air leak inside the tank with a crack in the fuel pickup tube. So even if you don’t have a leak in the hose, the tank needs to be looked at as well.
If there is any way you can find an fuel hose and extra tank that fits your engine, this is always a fast and easy way to see if an air leak or some other issues with the hose or tank is the problem. Start with the different hose and tank. If you don’t replicate the problem, try the old hose with new tank. Old tank with new hose, etc. Test each piece to see if you can identify which is the culprit.