Maybe choose an industry you think will become automated the quickest: whatever business can lay off all its labor first can distribute the newfound profit to investors instead
The idea that AI research must be regulated to prevent harms, including human extinction, is ridiculed on this site and in Silicon Valley, but policy is decided by representatives for the entire US voting population, not just the technologists of Silicon Valley, and polls show widespread skepticism in the broader population about the wisdom of continuing to create ever more capable AIs. Also, the people lobbying for a cap are disciplined, smart and well-funded.
Companies that focus on applying the models we have now will probably do OK (e.g., Google's using something analogous to GPT-4 to improve their Search service except that unlike GPT-4, Google's model can cite its sources) but OpenAI is not doing that: their focus is to increase capabilities trusting that it will become clear in the future how to use those increased capabilities to produce economic value, but that plan doesn't work very well if the government imposes a limit on the increase of capabilities.
Don't say I didn't try to warn you.
ADDED. The leader of OpenAI says that it cost OpenAI roughly 100 million dollars to provide the computing resources necessary to create GPT-4. Once that "foundational model" model was created, it could be run (deployed) on much humbler hardware; some open-source competitors to GPT-4 for example can run on a beefy Macbook. Naturally there is no practical way to stop people from running a model once it has been released to the public, so regulation will target the "training runs" such as the aforementioned training run that produced GPT-4.
The point is that there are many ways to "fine tune" a basic model to increase its economic value. GPT-4 by itself for example is useless as a search engine, but Microsoft fine-tuned it to produce something (Bing Chat, a.k.a., Sydney) that has some hope of becoming a popular search engine. You probably want to restrict your AI investments to companies good at this fine-tuning process.
More to the point, decision makers, e.g., in the US Congress, who were contemplating regulation of social media 10 years or 5 years ago knew that any harms caused by social media could be recovered from and can be probably persuaded that a mistake during "frontier" AI research probably cannot be recovered from.
The people pushing for regulation of AI research do not need to convince the decision makers to the point of certainty. If the average decision maker for example comes to believe that there is a 10% change that AI research will kill everyone (if left unregulated too long) they will shut down "frontier" AI research even it means lots of Silicon-Valley types and AI-sector investors get very sore at them because most decision makers (at least in the US) have grandchildren or the hopes of having grandchildren one day.
This is in contrast to the situation with social media 5 or 10 years ago, in which if a decision maker is only 10% certain that social media is harming the population, he's not likely to see that as a sufficient reason for making enemies in Silicon Valley and in those invested in Silicon Valley and as sufficient reason for doing the work of getting a law passed.
you invest in a company that have investment in SpaceX for example buy Google stock.