Welcome to JUST ANSWER small engines, let me try to help you !!
Has it been working ok, or has it be in storage? If not being used, the carburetor could be gummed up and not letting enough fuel into the engine to keep it running. This would mean you need to remove the float and needle valve, clean the carburetor ports and passages with spray carburetor cleaner and re-install the clean needle and float.
At the same time check the electric fuel shutoff in the base of the carburetor to be sure it retracts when the key is turned on and stays retracted as long as the key in in the run position. # XXXXX in the picture.
Here is similar type carburetor.
Let me know. Thank you.