Joel 1:18

How do the beasts groan! the herds of cattle are perplexed, because they have no pasture; yea, the flocks of sheep are made desolate.

The day of the Lord is a time of destruction in which pasture fails, cattle are distressed and perplexed, beasts groan, and flocks of sheep are made desolate. That devastation is severe, with livestock left bewildered and without food because there is no pasture for them. The groaning of the herds and the desolation of the flocks belong to the destruction and distress of that day.

The famine and ruin reach animals as well as people and the land, so that livestock suffer amid famine and the desolation of the land. Groaning animals, bewildered herds, and desolate sheep are joined to ruined crops and stores in one widespread agricultural desolation.

This is part of a prophetic picture of coming devastation in the final scenes of the world's history. It describes the condition of the world just before the second coming of the Lord. It is destruction and distress before the appearing of Christ.

It is specifically the devastation of the earth during the final plagues, when the land has no pasture and cattle groan in distress and flocks are left desolate. Scorching heat and failed crops leave the animals without food, and the pastures of the land are consumed by fire.