Your dog may be suffering from gastritis. It may have intestinal worms. So deworming is good option. Or it may be overconsumed or eaten decayed foods or mud or grass. so rule out these factors. Monthly deworming is a good practice for pet dogs. Avoid partially cooked or uncooked meat to dogs. You may have fed with rotten eggs?