If your dog eats grass then vomits and seems fine, they’ve probably taken care of whatever was bothering them. If they keep eating grass and vomiting, you should take them to see the veterinarian. If you’re ever concerned that this might not be a normal behavior, it is best to consult your veterinarian immediately.
Typically, the occasional grass grazing isn't a cause for concern, but if your dog compulsively ingests foreign objects on a regular basis, you may want to see if they have pica. Pica is a medical condition in dogs that leads them to crave or eat items that are not typically thought of as food. Cloth, dirt, paper, garbage and feces are all things that dogs with pica may be drawn to, and may be related to specific disease conditions that require veterinary care.
Overall, grass eating shouldn’t be a major cause for concern, but there are things you can do to make it less of an issue for your pet (as well as the lawn). If you ever feel like the habit is becoming a concern, contact your veterinarian for a professional recommendation.