The frenzied, pandemic-era burst of hiring across high-wage industries has ended. In its wake, firms are seeking to cut costs — and staff — in anticipation of a downturn. Here’s what you should do if you find yourself stuck at a company where layoffs loom.