The point of a union is not prevent layoffs and role reduction in force. It is to make sure that the company has done its absolute best to find another solution to the problem (that they're trying to solve with layoffs) and ensures that the company is accountable for all their decisions.
This just limits hiring in the first place as we see in European branches of (generally, American) tech companies. And regardless, what solutions can be found by the union?
As for what solutions union provide - I have already explained. They exist to protect workers' interests. They do not exist to solve company's problems. That is the job of the company.
Is that a serious question? Providing for education possibilities, legislating against noncompete agreements to hinder workers to start out on their own, challenging illegal decisions, the list goes on.