That was, indeed, how cattle used to be raised back in the day, with maybe some grain added to their diet to make up for seasonality of plants (after all, cow eating is a year-round business).
Nowadays, most cattle lives confined in a pen, being fed grass and grains depending on the stage of growth. There’s still some very small farmers using the traditional methodology, but the vast majority of the meat you can buy in a supermarket - even fancy ones like Wholefoods - are the product of mass production.
The USDA’s website has a pretty good rundown of the process: https://www.ers.usda.gov/topics/animal-products/cattle-beef/...