Agreed with the above, also if there is debris in the tank it can plug the anti siphon valve, and some have a screen on the end of the pickup tube. Doesn’t hurt to check those out while you are there.
Edit to add, do you actually check for spark when it quits? New components can be bad out of...