No.
First,depending on how far east they are going (say: Wyoming to the slaughterhouses in Chicago), that’s a thousand miles and many of the cattle would die along the way.
And it would mean a slow trek. Figure that a train in those days was going 30–35 mph. A herd of cattle doesn’t walk at 35 mph. Maybe, if you’re luck, 3–4 mph.
And then you need cowboys or escorts of the whole herd. Depending on the size of the herd, maybe a dozen or more cowboys. At least. So there’s personnel cost, horse cost, and what do the cowboys do on the way home? Deadheading and being paid for nothing.
Finally, how do you keep the herd from trampling every city and town and ranch and homestead on the way? Even the best managed herd is going to spread out. What a mess!
Bottom line is that the economics of railroad shipment, and the speed to market, were far more favorable than walking the cattle there.