The exact motive for grass eating is unsettled; it may aid gut motility or hairball passage or simply be instinct, and occasional vomiting afterward is common.
Indoor cats can be offered wheat or oat grass to satisfy the urge and spare houseplants; cat grass is a behavioral outlet, not a required nutrient.
The genuine danger is toxic plants: lilies carry severe kidney toxicity for cats, and plants like pothos irritate the mouth, so audit every houseplant.
If grass eating comes with frequent vomiting, poor appetite, or chewing non-plant objects, see a vet about gastrointestinal issues or pica.