The labor movement is having a moment. In a tight employment market, there is money to be had—or profits to be more generously shared—and workers have gotten some big wins recently. Even reality TV stars and NFL running backs are getting into it.

But this is not a revival of unions. In fact, unless they reform, it could be their last gasp. Yes, there have been more union drives and some undeniable successes. There is public support for a possible UAW strike this week and for unions in general. If you ask working Americans, however, most of them—about two-thirds of them, according to a 2022 Gallup poll—don’t want to actually be in a union. That helps explain why many union drives fail.

In a changing economy, the benefits of being in a union are often less compelling and the costs are still significant. That doesn’t mean unions don’t serve an important purpose. It does mean that they have to change.

Being in a union costs money. Workers not only have to pay dues, but unions work by compressing wages (and often the terms of advancement) in negotiations on behalf of all employees. This means very productive workers are paid almost the same as unproductive workers.

In the 1960s, even productive workers liked this deal, because it gave them job stability. There were also more gains to be divided up: The U.S. was the world’s industrial superpower, with little competition, and companies made large profits that could be shared with workers. Work then was more labor-intensive and harder to outsource, giving workers more bargaining power.

But today’s economy pays higher returns to exceptionally productive workers, and technology gives employers the ability to learn which employees are more productive. So an arrangement that made sense six decades ago makes less sense for workers now—especially the better ones. And there is lots of uncertainty to come, as AI brings more change and takes more power from workers.

True, UPS workers won a very good contract, and the UAW will probably win some wage gains. But today’s conditions are unusual. The labor market is tight (but weakening), and the auto industry is flush with government subsidies. In the longer term, as technology evolves and the political environment becomes less favorable for unions, there will be fewer victories.

The writers’ strike is in many ways more instructive because it better reflects trends in the broader economy. They are fighting for money in an industry where the business model is changing because of technology. Cable TV and movie theaters are on the wane, while streaming is on the rise.

Writers used to be able to earn money between jobs from residuals generated by reruns shown on commercial television. There is no such commercial revenue for reruns in a subscription streaming model, and value from a single show is harder to assess. And it’s not just the creatives who aren’t being paid—the studios are losing money too. If what happened to the music industry is any guide, the business model of the future for TV and movies is bigger paydays for stars and next to nothing for everyone else.

AI poses another unknown, though it will likely reinforce these trends. Whether or not AI can create content on its own, at the very least it has the potential to make writing more efficient. That means fewer writers will be needed. There will be less need for actors too, as less well-known actors with small or non-speaking parts can be replaced with technology. In short, AI is probably good news for talented and well-known writers and actors, and bad news for creatives just getting by.

The complexity of the problem, the uncertainty involved, the very real prospect that the new business model will be less lucrative than the current one—all help explain why the strike has dragged on for as long as it has. And the longer it goes, the higher the odds that more film and TV shows find a way to resume production, further undermining negotiations.

Making headway will require the union to embrace what made the SAG-AFTRA/WGA a workable union in the first place: They are more of a guild. They do negotiate on working conditions and establish a pay floor for specific jobs, but the terms still offer some flexibility. Pay negotiations happen on an individual level, so the big stars are still rewarded. While the less successful don’t have it easy, they have some stability from a pay floor and, most critically, health and retirement benefits.

This is what the future of unions needs to look like. They should be less about collective bargaining and more like guilds that offer various forms of insurance—for health, retirement and even wages, which would pay out during periods of non-employment or retraining. When it comes to bargaining, instead of wage and job security, unions should instead work out risk-sharing agreements with employers, with bigger bonuses in good markets and reduced pay or hours when times are bad.

In a changing economy with lots of uncertainty, workers and firms need two things: insurance and flexibility. Unions have the potential to provide both—and if they want to stay relevant, they need to start doing so now.

Allison Schrager is a Bloomberg Opinion columnist covering economics. A senior fellow at the Manhattan Institute, she is author of An Economist Walks Into a Brothel: And Other Unexpected Places to Understand Risk.